ray-input
ray-input copied to clipboard
Parse Error with ES6 importing?
ParseError: 'import' and 'export' may appear only with 'sourceType: module' line 16 ***/node_modules/ray-input/src/ray-input.js import OrientationArmModel from './orientation-arm-model' ^
any ideas on why ray-input isn't importing ?
I'm seeing this as well, while other similar libraries (like webvr-ui) are importing fine. It's not obvious to me what the difference is. :(
I believe this is because we specify our browserify transforms in the package.json like so in replacement of our npm script calling browserify including any transforms.
Otherwise my understanding is your parent project's transforms won't apply to node_modules/
For what it's worth I have that in my own code, and I've tried pasting that into this repo's package.json as well but it didn't help. Renaming the main file to src/index.js instead of src/ray-input.js, though, DID fix it, because Javascript toolchains are magical in the worst way. 😡