From 10b36c1b0fd8458897a5021d1041dd6e57faff39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B8egh?= Date: Sun, 1 Oct 2023 17:32:33 +0200 Subject: [PATCH] fix(logs): remove commons for appearing in the logs (#14) --- packages/gatsby-plugin-eufemia-theme-handler/gatsby-node.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/gatsby-plugin-eufemia-theme-handler/gatsby-node.js b/packages/gatsby-plugin-eufemia-theme-handler/gatsby-node.js index e3f6786..e7867de 100644 --- a/packages/gatsby-plugin-eufemia-theme-handler/gatsby-node.js +++ b/packages/gatsby-plugin-eufemia-theme-handler/gatsby-node.js @@ -88,14 +88,13 @@ exports.onCreateWebpackConfig = ( name(module) { const fileName = slash(module.context) if (isInGlob(fileName)) { - const moduleName = - fileName.match(/\/.*theme-([^/]*)$/)?.[1] || 'commons' + const moduleName = fileName.match(/\/.*theme-([^/]*)$/)?.[1] if (moduleName && !global.themeNames.includes(moduleName)) { global.themeNames.push(moduleName) } - return moduleName + return moduleName || 'commons' } return 'commons'