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

@ -52,7 +52,7 @@
"dependencies": { "dependencies": {
"@angular-devkit/core": "~10.0.0", "@angular-devkit/core": "~10.0.0",
"clean-webpack-plugin": "~3.0.0", "clean-webpack-plugin": "~3.0.0",
"copy-webpack-plugin": "~6.0.2", "copy-webpack-plugin": "4.6.0",
"css": "~3.0.0", "css": "~3.0.0",
"css-loader": "~4.2.0", "css-loader": "~4.2.0",
"escape-string-regexp": "~4.0.0", "escape-string-regexp": "~4.0.0",

View File

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

View File

@ -244,14 +244,12 @@ module.exports = env => {
verbose: !!verbose verbose: !!verbose
}), }),
// Copy assets // Copy assets
new CopyWebpackPlugin({ new CopyWebpackPlugin([
patterns: [ { from: { glob: 'assets/**', dot: false } },
{ from: 'assets/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, { from: { glob: 'fonts/**', dot: false } },
{ from: 'fonts/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, { from: { glob: '**/*.jpg', dot: false } },
{ from: '**/*.jpg', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, { from: { glob: '**/*.png', dot: false } },
{ from: '**/*.png', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, ], copyIgnore),
],
}),
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
// For instructions on how to set up workers with webpack // For instructions on how to set up workers with webpack

View File

@ -297,14 +297,12 @@ module.exports = env => {
verbose: !!verbose verbose: !!verbose
}), }),
// Copy assets // Copy assets
new CopyWebpackPlugin({ new CopyWebpackPlugin([
patterns: [ { from: { glob: 'assets/**', dot: false } },
{ from: 'assets/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, { from: { glob: 'fonts/**', dot: false } },
{ from: 'fonts/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, { from: { glob: '**/*.jpg', dot: false } },
{ from: '**/*.jpg', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, { from: { glob: '**/*.png', dot: false } },
{ from: '**/*.png', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, ], copyIgnore),
],
}),
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
// For instructions on how to set up workers with webpack // For instructions on how to set up workers with webpack
// check out https://github.com/nativescript/worker-loader // check out https://github.com/nativescript/worker-loader

View File

@ -273,14 +273,12 @@ module.exports = env => {
verbose: !!verbose verbose: !!verbose
}), }),
// Copy assets // Copy assets
new CopyWebpackPlugin({ new CopyWebpackPlugin([
patterns: [ { from: { glob: 'assets/**', dot: false } },
{ from: 'assets/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, { from: { glob: 'fonts/**', dot: false } },
{ from: 'fonts/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, { from: { glob: '**/*.jpg', dot: false } },
{ from: '**/*.jpg', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, { from: { glob: '**/*.png', dot: false } },
{ from: '**/*.png', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, ], copyIgnore),
],
}),
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
// For instructions on how to set up workers with webpack // For instructions on how to set up workers with webpack
// check out https://github.com/nativescript/worker-loader // check out https://github.com/nativescript/worker-loader

View File

@ -301,13 +301,12 @@ module.exports = env => {
verbose: !!verbose verbose: !!verbose
}), }),
// Copy assets // Copy assets
new CopyWebpackPlugin({ new CopyWebpackPlugin([
patterns: [ { from: { glob: 'assets/**', dot: false } },
{ from: 'assets/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, { from: { glob: 'fonts/**', dot: false } },
{ from: 'fonts/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, { from: { glob: '**/*.jpg', dot: false } },
{ from: '**/*.+(jpg|png)', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } } { from: { glob: '**/*.png', dot: false } },
], ], copyIgnore),
}),
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
// For instructions on how to set up workers with webpack // For instructions on how to set up workers with webpack
// check out https://github.com/nativescript/worker-loader // check out https://github.com/nativescript/worker-loader