fix: rollback CopyWebpackPlugin to v4.6.0 (#9099)

This commit is contained in:
Jamie Birch
2020-12-28 12:51:23 +00:00
committed by GitHub
parent b47ce0a97c
commit 1a0c643b68
6 changed files with 33 additions and 38 deletions

View File

@ -116,9 +116,9 @@ module.exports = env => {
const copyIgnore = { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] };
const copyTargets = [
{ from: 'assets/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } },
{ from: 'fonts/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } },
...copyReplacements
{ from: { glob: 'assets/**', dot: false } },
{ from: { glob: 'fonts/**', dot: false } },
...copyReplacements,
];
if (!production) {
@ -395,9 +395,11 @@ module.exports = env => {
verbose: !!verbose
}),
// Copy assets
new CopyWebpackPlugin({
patterns: copyTargets,
}),
new CopyWebpackPlugin([
...copyTargets,
{ from: { glob: '**/*.jpg', dot: false } },
{ from: { glob: '**/*.png', dot: false } },
], copyIgnore),
new nsWebpack.GenerateNativeScriptEntryPointsPlugin('bundle'),
// For instructions on how to set up workers with webpack
// check out https://github.com/nativescript/worker-loader