Skip to content

Commit

Permalink
fix(core): avoid breaking change for duplicate modules (resolves #7605)
Browse files Browse the repository at this point in the history
  • Loading branch information
pooya parsa committed Jun 25, 2020
1 parent 415d408 commit d0056fb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/src/module.js
Expand Up @@ -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 }
}
Expand Down

0 comments on commit d0056fb

Please sign in to comment.