mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 06:01:34 +00:00
fix(core): avoid breaking change for duplicate modules (resolves #7605)
This commit is contained in:
parent
415d4083ca
commit
d0056fbcc8
@ -194,7 +194,12 @@ export default class ModuleContainer {
|
||||
const key = (handler.meta && handler.meta.name) || src
|
||||
if (typeof key === 'string') {
|
||||
if (this.requiredModules[key]) {
|
||||
return
|
||||
if (key === src) {
|
||||
// TODO: Skip with nuxt3
|
||||
consola.warn('Modules should be only specified once:', key)
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
this.requiredModules[key] = { src, options, handler }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user