mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-05-04 02:50:03 -05:00
chore: check file existence first in MovePlugin
This commit is contained in:
@@ -8,7 +8,9 @@ module.exports = class MovePlugin {
|
||||
|
||||
apply (compiler) {
|
||||
compiler.hooks.done.tap('move-plugin', () => {
|
||||
fs.moveSync(this.from, this.to, { overwrite: true })
|
||||
if (fs.existsSync(this.from)) {
|
||||
fs.moveSync(this.from, this.to, { overwrite: true })
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user