MQuy/webpack-deadcode-plugin

Running on Node v6 having SyntaxError: Unexpected token ...

thaod opened this issue · 2 comments

thaod commented

Work well with Node v8

$ nvm use 8
Now using node v8.9.3 (npm v5.5.1)
$ node src/index.js 

But having SyntaxError: Unexpected token ... when running on Node v6.

$ nvm use 6
Now using node v6.14.1 (npm v3.10.10)
$ node src/index.js 
/webpack-deadcode-plugin/src/index.js:7
      ...options,
      ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.runMain (module.js:611:10)
    at run (bootstrap_node.js:387:7)
    at startup (bootstrap_node.js:153:9)

Reference on StackOverflow: Node v6 failing on object spread

MQuy commented

my bad, I forget that the feature above doesn't exist on v6. Thanks @thaod 👍🏻

MQuy commented

@thaod just pushed a fix, should be ok now if you yarn upgrade webpack-deadcode-plugin 🤔