Skip to content

Commit 87cc98a

Browse files
committed
chore: check file existence first in MovePlugin
1 parent ec508c7 commit 87cc98a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/@vue/cli-service/lib/webpack/MovePlugin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ module.exports = class MovePlugin {
88

99
apply (compiler) {
1010
compiler.hooks.done.tap('move-plugin', () => {
11-
fs.moveSync(this.from, this.to, { overwrite: true })
11+
if (fs.existsSync(this.from)) {
12+
fs.moveSync(this.from, this.to, { overwrite: true })
13+
}
1214
})
1315
}
1416
}

0 commit comments

Comments
 (0)