-
Notifications
You must be signed in to change notification settings - Fork 38
Description
There appears to be no direct instructions on the build process so I assume it's meant to follow the regular build process similar to haxe react-native does. I believe this issue may be down to basic project setup but would like to mention it here to help anyone else looking to use the library.
As I couldn't get the sample project to compile, I attempted to get a project going with npm init react-app my-app but I kept on getting the error ./src/index.js Line 45: Unexpected use of 'self' no-restricted-globals with the haxe code output, manually fixing this error by changing the export code to window.self just reveals tons of other issues.
I tried modifying the sample project removing the references to msignals and only using ReactComponent rather than ReactComponentOfStateAndRefs and just export the Main file to get the project to at least compile. There also wasn't a package.json file bundled with the sample project so I used the standard one:
{
"name": "bin",
"version": "1.0.0",
"description": "",
"main": "index.html",
"dependencies": {
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-scripts": "2.1.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"devDependencies": {},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}which also outputs this no-restricted-globals error message. Now I could be totally wrong in my approach here but I believe the regular way to start up a react instance is by running npm start so any help or an updated sample project (maybe just a plain empty one instead to avoid dependencies getting deprecated) would be appreciated.
Edit: Running browserify as mentioned in the readme, did not fix this issue