Skip to content

Commit

Permalink
fix: e2e build error
Browse files Browse the repository at this point in the history
  • Loading branch information
guanbinrui committed Aug 6, 2020
1 parent 8dc7415 commit 6fded17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions scripts/gulp/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ export const [environmentFile, watchEnvironmentFile] = createTask(
src(manifestPath.file)
.pipe(
modifyFile(
(x) => `globalThis.process = {};
globalThis.process.env = ${JSON.stringify(getEnvironment(mode))};`,
(x) => `
globalThis.process = {};
globalThis.process.env = ${JSON.stringify(getEnvironment(mode))};
`,
),
)
.pipe(rename('env.js'))
Expand Down
2 changes: 1 addition & 1 deletion scripts/gulp/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (!['fennec', 'geckoview'].includes(firefoxVariant)) throw new Error(`Unknown

export function getEnvironment(mode: Configuration['mode']) {
return {
NODE_ENV: buildTarget === 'E2E' ? 'test' : mode,
NODE_ENV: mode,
target: buildTarget,
architecture: buildArchitecture,
resolution: buildResolution,
Expand Down

0 comments on commit 6fded17

Please sign in to comment.