fix: Duplicate declaration plugin when add/remove file in dev mode (#4278)

This commit is contained in:
Clark Du 2018-11-06 10:50:38 +00:00 committed by GitHub
parent 1a154e8188
commit 3f2b10ea0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,6 +207,7 @@ export default class Builder {
async generateRoutesAndFiles() { async generateRoutesAndFiles() {
consola.debug(`Generating nuxt files`) consola.debug(`Generating nuxt files`)
this.plugins.length = 0
this.plugins.push.apply(this.plugins, this.normalizePlugins()) this.plugins.push.apply(this.plugins, this.normalizePlugins())
// -- Templates -- // -- Templates --