From 347e820b36d60216cdb15af7f418b209c7f26d51 Mon Sep 17 00:00:00 2001 From: Diana Catalina Olarte Date: Fri, 2 Aug 2024 14:48:04 +1000 Subject: [PATCH] refactor: remove process.env references in ParagonWebpackPlugin, no supported --- .../paragon-webpack-plugin/ParagonWebpackPlugin.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/plugins/paragon-webpack-plugin/ParagonWebpackPlugin.js b/lib/plugins/paragon-webpack-plugin/ParagonWebpackPlugin.js index 4e42051e4..12324ac7c 100644 --- a/lib/plugins/paragon-webpack-plugin/ParagonWebpackPlugin.js +++ b/lib/plugins/paragon-webpack-plugin/ParagonWebpackPlugin.js @@ -11,12 +11,6 @@ const { injectParagonCoreStylesheets, injectParagonThemeVariantStylesheets, } = require('./utils'); -const resolvePrivateEnvConfig = require('../../resolvePrivateEnvConfig'); - -// Allow private/local overrides of env vars from .env.development for config settings -// that you'd like to persist locally during development, without the risk of checking -// in temporary modifications to .env.development. -resolvePrivateEnvConfig('.env.private'); // Resolve configuration `env.config`. const envConfigFile = path.resolve(process.cwd(), 'env.config.js'); @@ -47,10 +41,7 @@ class ParagonWebpackPlugin { } /** - * Resolves the MFE configuration for ``PARAGON_THEME_URLS`` in the following priority order: - * - * 1. ``envConfig.PARAGON_THEME_URLS`` - * 2. ``process.env.PARAGON_THEME_URLS`` + * Resolves the MFE configuration for ``PARAGON_THEME_URLS`` in env.config.js * * @returns {Object} Metadata about the Paragon and brand theme URLs from configuration. */ @@ -64,7 +55,7 @@ class ParagonWebpackPlugin { } } - const paragonThemeUrls = envConfig?.PARAGON_THEME_URLS ?? process.env.PARAGON_THEME_URLS; + const paragonThemeUrls = envConfig?.PARAGON_THEME_URLS ?? {}; this.paragonThemeUrlsConfig = paragonThemeUrls; }