Since updating webpack to 2.2.1, I'm getting this error while building the project:
Error: BannerPlugin only takes one argument (pass an options object)
This is how I use the plugin:
plugins: [
new webpack.DefinePlugin(GLOBALS),
new webpack.BannerPlugin('require("source-map-support").install();',
{ raw: true, entryOnly: false }),
],
Can't figure our what I'm doing wrong, seems to be ok according to documentation.
Take a look at https://webpack.js.org/guides/migrating/#bannerplugin-breaking-change. This was the only documentation I could find on the change. The first string argument in your version moves into the config object as a "banner" property.
new webpack.BannerPlugin({banner: 'require("source-map-support").install();', raw: true, entryOnly: false})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With