From b070e19a1535ae7dbafe0a94e9c6dfd8150f6259 Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Thu, 25 Jun 2020 16:52:40 +0200 Subject: [PATCH] fix(core): only warn for duplicate module if metaKey is not specified --- packages/core/src/module.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/src/module.js b/packages/core/src/module.js index e22c94583e..5b51cc31b2 100644 --- a/packages/core/src/module.js +++ b/packages/core/src/module.js @@ -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 {