diff --git a/CHANGES.md b/CHANGES.md index e409c6b3..34a7ab25 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Unreleased (in `master`) +## Fixed + +- Always add `CopyPlugin` when [`webpack.copy` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#copy-array--object) is provided [[#431](https://github.com/insin/nwb/issues/431)] + ## Dependencies - opn: v5.2.0 → [v5.3.0](https://github.com/sindresorhus/opn/compare/v5.2.0...v5.3.0) diff --git a/src/createWebpackConfig.js b/src/createWebpackConfig.js index 9337c7f2..d5fbc817 100644 --- a/src/createWebpackConfig.js +++ b/src/createWebpackConfig.js @@ -558,7 +558,7 @@ export function createPlugins( } // Copy static resources - if (buildConfig.copy) { + if (buildConfig.copy || userConfig.copy) { plugins.push(new CopyPlugin( ...getCopyPluginArgs(buildConfig.copy, userConfig.copy) ))