webpack-contrib / babel-minify-webpack-plugin

[DEPRECATED] Babel Minify Webpack Plugin
MIT License
491 stars 44 forks source link

Invalid option "test" bug #41

Closed ugo-buonadonna closed 7 years ago

ugo-buonadonna commented 7 years ago

Hi,

When using the plugin like that:

new BabiliPlugin({
      options: {
        test: /\.jsx?$/i,
        comments: false,
        sourceMap: true
      }
    })

and then running webpack compilation, this error shows up in the terminal: ERROR: Invalid option "test"

This error is actually thrown by the babel-preset-babili module.

I had to revert to the 0.0.11 version in order to make it work again.

I'm using webpack version 2.6.0.

Thanks

szimek commented 7 years ago

Shouldn't it actually be:

new BabiliPlugin({}, {
  test: /\.jsx?$/i,
  comments: false,
  sourceMap: true,
})

? According to the docs it's new BabiliPlugin(babiliOptions, overrides), where overrides are what you're setting.

boopathi commented 7 years ago

Closing the issue as it's already answered.