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