Open fabiosantoscode opened 7 years ago
Googlers from the future:
I worked around this issue by setting the acorn options myself. Since this module doesn't use acorn directly to parse, you need to get the same acorn as the one falafel is using. Which is a bit weird with npm3.
require('falafel/node_modules/acorn').defaultOptions.sourceType = 'module'
It's quite quirky and confusing, but that will do for this prototype.
Cheers!
@fabiosantoscode Hi, i check the falafel but got nothing for acorn, i use webpack 3.0, thanks
Currently, static-module crashes when reading modules which use the 'import' statement. This makes it fail to parse those modules and crash with the cryptic error message:
Which after some research I found comes from acorn, which is the crashing entity here :)
(my use case, IE how this crash affects me): This failure cascades to brfs, and from then on webpack's transform-loader. Webpack 2 now supports ES6 modules, which create-react-app favours. This made webpack fail to compile my project as it uses import statements.