When using this plugin, I get the error:
webpack-copy-plugin: options.dirs undefined is required.
In my webpack config I defined:
plugins: [
new CopyPlugin([{
from: './node_modules/reload/lib/reload-client.js',
to: './public/reload-client.js',
toType: 'file'
}])]
I'm running node v11.9.0 on Mac OSX High Sierra.
No idea what the error means. It should work no?
Thanks.
I found out what the problem is.
The format requires:
new CopyPlugin({ dirs: [{
from: './node_modules/reload/lib/reload-client.js',
to: './public/reload-client.js',
toType: 'file'
}]}
But honestly, please update your documentation if you make changes to the code.
The github frontpage for this library is in fact wrong.
Seems I was looking at webpack-copy-plugin instead of copy-webpack-plugin.
This made me laugh, I did exactly the same. Thanks for pointing that out. 馃憤
Most helpful comment
This made me laugh, I did exactly the same. Thanks for pointing that out. 馃憤