fix(builder): add hash to generated plugin names

A plugin named `bootstrap` results importing bootstrap jquery!
This commit is contained in:
Pooya Parsa 2017-11-07 13:17:50 +03:30
parent f626acf1f9
commit 80fb65040b

View File

@ -63,7 +63,7 @@ export default class Builder {
return { return {
src: this.nuxt.resolvePath(p.src), src: this.nuxt.resolvePath(p.src),
ssr: (p.ssr !== false), ssr: (p.ssr !== false),
name: basename(p.src, extname(p.src)).replace(/[^a-zA-Z?\d\s:]/g, '') name: basename(p.src, extname(p.src)).replace(/[^a-zA-Z?\d\s:]/g, '') + '_' + hash(p.src)
} }
}) })
} }