question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Smart merge causes plugin like CopyWebpackPlugin to be removed

See original GitHub issue

Upgrade 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:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bebrawcommented, Jan 6, 2017

Yeah, I see now. CopyWebpackPlugin does function 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.

0reactions
thebuildercommented, Jan 6, 2017

Awesome - Thanks for quick response and action. 🥇

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found