Smart merge causes plugin like CopyWebpackPlugin to be removed
See original GitHub issueUpgrade to webpack-merge 2.2.0, and it caused the CopyWebpackPlugin to fail.
Looking at the merged “plugins” array in 2.0.0, the CopyWebpackPlugin is listed as { apply: [Function: apply] }, where other plugins look like: UglifyJsPlugin { options: { sourceMap: true, compress: [Object], mangle: [Object], output: [Object] } }
In 2.2.0. the reference to the CopyWebpackPlugin function is removed from the array.
Should a plugin like this be something the smart merging should handle?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Merging unique CopyWebpackPlugin · Issue #103 - GitHub
I think I am just trying to use merge.unique incorrectly and my example above will just remove the 2nd config's CopyWebpackPlugin entry.
Read more >CopyWebpackPlugin | webpack
Copies individual files or entire directories, which already exist, to the build directory. Getting Started. To begin, you'll need to install copy-webpack- ......
Read more >Copy additional javascripts with copy-webpack-plugin - GitLab
This MR uses the copy-webpack-plugin to directly copy 4 additional javascripts over to javascripts/applications and update links to them.
Read more >webpack-merge | Yarn - Package Manager
webpack-merge provides a merge function that concatenates arrays and merges objects creating a new object. If functions are encountered, it will execute them, ......
Read more >How to combine Webpack 4 and Babel 7 to ... - freeCodeCamp
The way it works is you need to wrap your configuration with merge like the one below. Let's start off by making our...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yeah, I see now.
CopyWebpackPlugindoesfunction CopyWebpackPlugin(patterns = [], options = {}) {which is something the other plugins don’t do. This needs some special handling.Thanks for the report. I’ll try to fix this up. Most likely it takes an extra check to account for the pattern they are using.
Awesome - Thanks for quick response and action. 🥇