Skip to content

Commit 6a47fe6

Browse files
committed
fix: fixed CopyOption bug
1 parent 4eeb8f7 commit 6a47fe6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/extends/unified/prod.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@ module.exports = function unifiedExtend(api, opts) {
5959
if (staticPaths.length) {
6060
const CopyWebpackPlugin = tryRequire('copy-webpack-plugin');
6161
if (CopyWebpackPlugin) {
62+
const outputDir = webpackChain.output.get('path');
6263
webpackChain
6364
.plugin('copy')
6465
.use(CopyWebpackPlugin, [ staticPaths.map(publicDir => {
6566
return {
6667
from: publicDir,
67-
// to: options.outputDir, // 自动使用 webpack 配置
68-
toType: 'dir',
68+
to: outputDir,
69+
// toType: 'dir',
6970
ignore: publicCopyIgnore,
7071
};
7172
}) ]);

0 commit comments

Comments
 (0)