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

This commit is contained in:
Book Pauk
2022-09-20 21:25:30 +07:00
parent 96b1b4a573
commit 93a41f9158
2 changed files with 2 additions and 2 deletions

View File

@@ -39,6 +39,6 @@ module.exports = merge(baseWpConfig, {
template: `${clientDir}/index.html.template`, template: `${clientDir}/index.html.template`,
filename: `${publicDir}/index.html` 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

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