Skip to content

Commit

Permalink
refactor: remove process.env references in ParagonWebpackPlugin, no s…
Browse files Browse the repository at this point in the history
…upported
  • Loading branch information
dcoa committed Aug 2, 2024
1 parent 4ac4d42 commit 347e820
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions lib/plugins/paragon-webpack-plugin/ParagonWebpackPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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;
}
Expand Down

0 comments on commit 347e820

Please sign in to comment.