I wanted to let you know of a small error I found in Chapter 9 and more specifically section 9.10. In the code snippet for the webpack.config.js file, the constructor function new CopyWebpackPlugin() as laid out in the book will produce a Webpack error informing the user that the arguments to this function do not match what Webpack expects them to be.
The function now expects an object instead of an array, with a required patterns key and an array as its value.
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
plugins: [
new CopyPlugin({
patterns: [
{ from: "source", to: "dest" },
{ from: "other", to: "public" },
],
}),
],
};
Just wanted to make you aware of this change and thank you for so much detail and hard work put into book, I've really enjoyed working through the material!
Hello Dr. Rauschmayer @rauschma !
I wanted to let you know of a small error I found in Chapter 9 and more specifically section 9.10. In the code snippet for the
webpack.config.js
file, the constructor functionnew CopyWebpackPlugin()
as laid out in the book will produce a Webpack error informing the user that the arguments to this function do not match what Webpack expects them to be.I did some searching through the plugins changelog and it appears this was a change to the API made back in May of last year
The function now expects an object instead of an array, with a required patterns key and an array as its value.
Just wanted to make you aware of this change and thank you for so much detail and hard work put into book, I've really enjoyed working through the material!