fix: invalid all require.cache in watching

This commit is contained in:
Clark Du 2017-12-04 17:59:37 +08:00
parent 2f372c9644
commit 5ece7127c5
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9

View File

@ -460,8 +460,7 @@ export default class Builder {
/* istanbul ignore if */
if (err) return reject(err)
// not keep modified or deleted items in Vue.prototype
delete require.cache[require.resolve('vue')]
delete require.cache[require.resolve('vue-router')]
Object.keys(require.cache).forEach(key => delete require.cache[key])
})
)
return