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