Files
vue-cli/packages/@vue/cli-service/lib/webpack/TimeFixPlugin.js
2018-01-09 17:45:41 -05:00

17 lines
341 B
JavaScript

module.exports = class TimeFixPlugin {
constructor (timefix = 11000) {
this.timefix = timefix
}
apply (compiler) {
compiler.plugin('watch-run', (watching, callback) => {
watching.startTime += this.timefix
callback()
})
compiler.plugin('done', stats => {
stats.startTime -= this.timefix
})
}
}