ALiangLiang / vue-webpack-chrome-extension-template

Template for quick creation of Chrome extension on Vuejs hot reloading when developing.
MIT License
107 stars 13 forks source link

System assumes spread operator enabled #4

Closed kkinder closed 6 years ago

kkinder commented 6 years ago

After following the install instructions, when you run run dev, you'll get this.

npm run dev

> example-chrome-text@1.0.0 dev /home/ken/playground/example-chrome-text
> webpack --config ./build/webpack.dev.js --hide-modules

/home/ken/playground/example-chrome-text/build/webpack.base.js:47
...cssLoaders(),
^^^

SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/ken/playground/example-chrome-text/build/webpack.dev.js:4:21)

It appears the default babel config doesn't enable the spread operator.

ALiangLiang commented 6 years ago

um...... I think you need Nodejs version equal or upper than 8. Because this part is belong to webpack script instead of babel.

But I will update that for compatible with nodejs6.

kkinder commented 6 years ago

Ah, upgrading Node did the trick. Thanks!