Поправки параметров CopyWebpackPlugin

This commit is contained in:
Book Pauk
2022-09-20 20:21:41 +07:00
parent ffedce4351
commit b58d3a1b8b
2 changed files with 2 additions and 2 deletions

View File

@@ -38,6 +38,6 @@ module.exports = merge(baseWpConfig, {
template: `${clientDir}/index.html.template`,
filename: `${publicDir}/index.html`
}),
new CopyWebpackPlugin({patterns: [{from: `${clientDir}/assets/*`, to: `${publicDir}/`}]})
new CopyWebpackPlugin({patterns: [{context: `${clientDir}/assets`, from: `${clientDir}/assets/*`, to: `${publicDir}/`}]})
]
});

View File

@@ -54,7 +54,7 @@ module.exports = merge(baseWpConfig, {
filename: `${publicDir}/index.html`
}),
new CopyWebpackPlugin({patterns:
[{from: `${clientDir}/assets/*`, to: `${publicDir}/`, context: `${clientDir}/assets` }]
[{context: `${clientDir}/assets`, from: `${clientDir}/assets/*`, to: `${publicDir}/` }]
}),
new GenerateSW({
cacheId: 'liberama',