mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix environment variable injection (#15318)
The environment variables `IN_TEST` and `METAMASK_DEBUG` were not being set to `false` correctly. Instead those variables were being skipped, and were resolved to `undefined` at runtime. This is confusing because the other environment variables do not work that way - they can be set to false. The build script has been updated to ensure those two environment variables are always set to `true` or `false` - never `undefined`. Additionally, the `METAMASK_VERSION` environment variable was being omitted from the `app-init.js` bundle. For the sake of consistency, that has also been restored.
This commit is contained in:
parent
e280204287
commit
2bcc1c512c
@ -219,7 +219,11 @@ function createScriptTasks({
|
||||
const { dev, test, testDev, prod } = core;
|
||||
return { dev, test, testDev, prod };
|
||||
|
||||
function createTasksForScriptBundles({ taskPrefix, devMode, testing }) {
|
||||
function createTasksForScriptBundles({
|
||||
taskPrefix,
|
||||
devMode = false,
|
||||
testing = false,
|
||||
}) {
|
||||
const standardEntryPoints = ['background', 'ui', 'content-script'];
|
||||
const standardSubtask = createTask(
|
||||
`${taskPrefix}:standardEntryPoints`,
|
||||
@ -401,6 +405,7 @@ async function createManifestV3AppInitializationBundle({
|
||||
policyOnly,
|
||||
shouldLintFenceFiles,
|
||||
applyLavaMoat,
|
||||
version,
|
||||
}) {
|
||||
const label = 'app-init';
|
||||
// TODO: remove this filter for firefox once MV3 is supported in it
|
||||
@ -423,6 +428,7 @@ async function createManifestV3AppInitializationBundle({
|
||||
testing,
|
||||
policyOnly,
|
||||
shouldLintFenceFiles,
|
||||
version,
|
||||
})();
|
||||
|
||||
postProcessServiceWorker(
|
||||
@ -632,6 +638,7 @@ function createFactoredBuild({
|
||||
policyOnly,
|
||||
shouldLintFenceFiles,
|
||||
applyLavaMoat,
|
||||
version,
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user