You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to convert data.js into ES6, the compiler chokes at the first import statement used. No idea why this would happen. I searched around for a while and came across a few similar issues, all with Webpack/React, but I didn't find anything particular to my case.
This works var cssnext = require('cssnext')
This does not import cssnext from 'cssnext'
So weird.
import cssnext from 'cssnext'
^^^^^^
SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/DeadFamous_AD2/Sites/yet-another/webpack.config.js:2:12)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at module.exports (/usr/local/lib/node_modules/webpack/bin/convert-argv.js:56:13)
at Object.<anonymous> (/usr/local/lib/node_modules/webpack/bin/webpack.js:54:40)
The text was updated successfully, but these errors were encountered:
Because you're only compiling the app Javascript. You're not actually using compiling the Webpack Js itself. So you're using node's ES6, which way behind the spec unlike Babel.
If you try to convert data.js into ES6, the compiler chokes at the first import statement used. No idea why this would happen. I searched around for a while and came across a few similar issues, all with Webpack/React, but I didn't find anything particular to my case.
This works
var cssnext = require('cssnext')
This does not
import cssnext from 'cssnext'
So weird.
The text was updated successfully, but these errors were encountered: