1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/@vue/cli-service/lib/webpack/MovePlugin.js

17 lines
330 B
JavaScript
Raw Normal View History

2023-12-18 13:12:25 +08:00
const fs = require('fs-extra')
module.exports = class MovePlugin {
constructor (from, to) {
this.from = from
this.to = to
}
apply (compiler) {
compiler.hooks.done.tap('move-plugin', () => {
if (fs.existsSync(this.from)) {
fs.moveSync(this.from, this.to, { overwrite: true })
}
})
}
}