mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +00:00
fix(core): only warn for duplicate module if metaKey is not specified
This commit is contained in:
parent
b0274357b3
commit
b070e19a15
@ -191,10 +191,11 @@ export default class ModuleContainer {
|
||||
}
|
||||
|
||||
// Ensure module is required once
|
||||
const key = (handler.meta && handler.meta.name) || src
|
||||
const metaKey = handler.meta && handler.meta.name
|
||||
const key = metaKey || src
|
||||
if (typeof key === 'string') {
|
||||
if (this.requiredModules[key]) {
|
||||
if (key === src) {
|
||||
if (!metaKey) {
|
||||
// TODO: Skip with nuxt3
|
||||
consola.warn('Modules should be only specified once:', key)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user