shaketbaby / directory-named-webpack-plugin

A Webpack plugin that treats a file with the name of directory as the index file
MIT License
182 stars 17 forks source link

2.2.0 syntax error on Node 5 #19

Closed ox-michaelradionov closed 7 years ago

ox-michaelradionov commented 7 years ago

Version 2.2.0 has a syntax error on Node 5.12.0, as destructuring is only supported in Node 6+.

.../node_modules/directory-named-webpack-plugin/index.js:8
      01   var {honorPackage: mainFields, exclude, include} = optionsToUse;
      01       ^
      01 
      01 SyntaxError: Unexpected token {
      01     at exports.runInThisContext (vm.js:53:16)
      01     at Module._compile (module.js:387:25)
      01     at Object.Module._extensions..js (module.js:422:10)
      01     at Module.load (module.js:357:32)
      01     at Function.Module._load (module.js:314:12)
      01     at Module.require (module.js:367:17)
      01     at require (internal/module.js:20:19)
      01     at Object.<anonymous> 
shaketbaby commented 7 years ago

Sorry, have fixed, v2.2.1 released.

ox-michaelradionov commented 7 years ago

It's fine. Works in 2.2.1. Thank you!