mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
minor fixes
This commit is contained in:
parent
c1d283bb94
commit
786b25adb8
@ -71,10 +71,11 @@ export default class Builder {
|
||||
get plugins() {
|
||||
return _.uniqBy(this.options.plugins.map((p, i) => {
|
||||
if (typeof p === 'string') p = { src: p }
|
||||
const pluginBaseName = basename(p.src, extname(p.src)).replace(/[^a-zA-Z?\d\s:]/g, '')
|
||||
return {
|
||||
src: this.nuxt.resolvePath(p.src),
|
||||
ssr: (p.ssr !== false),
|
||||
name: basename(p.src, 'nuxt_plugin_' + extname(p.src)).replace(/[^a-zA-Z?\d\s:]/g, '') + '_' + hash(p.src)
|
||||
name: 'nuxt_plugin_' + pluginBaseName + '_' + hash(p.src)
|
||||
}
|
||||
}), p => p.name)
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ export default class WarnFixPlugin {
|
||||
stats.compilation.warnings = stats.compilation.warnings.filter(warn => {
|
||||
if (warn.name === 'ModuleDependencyWarning' &&
|
||||
warn.message.includes(`export 'default'`) &&
|
||||
warn.message.indexOf('nuxt_plugin_') === 0) {
|
||||
warn.message.includes('nuxt_plugin_')) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user