mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 20:02:58 +01:00
prevent environment key from leaking into all builds (#9752)
This commit is contained in:
parent
186ee97d36
commit
c130a7ae6c
@ -325,7 +325,8 @@ function createScriptTasks ({ browserPlatforms, livereload }) {
|
||||
// inflating event volume.
|
||||
const SEGMENT_PROD_WRITE_KEY = opts.testing ? undefined : process.env.SEGMENT_PROD_WRITE_KEY
|
||||
const SEGMENT_DEV_WRITE_KEY = opts.testing ? undefined : conf.SEGMENT_WRITE_KEY
|
||||
const SEGMENT_LEGACY_WRITE_KEY = opts.testing ? undefined : conf.SEGMENT_LEGACY_WRITE_KEY
|
||||
const SEGMENT_PROD_LEGACY_WRITE_KEY = opts.testing ? undefined : process.env.SEGMENT_PROD_LEGACY_WRITE_KEY
|
||||
const SEGMENT_DEV_LEGACY_WRITE_KEY = opts.testing ? undefined : conf.SEGMENT_LEGACY_WRITE_KEY
|
||||
|
||||
// Inject variables into bundle
|
||||
bundler.transform(envify({
|
||||
@ -345,7 +346,7 @@ function createScriptTasks ({ browserPlatforms, livereload }) {
|
||||
: conf.INFURA_PROJECT_ID
|
||||
),
|
||||
SEGMENT_WRITE_KEY: environment === 'production' ? SEGMENT_PROD_WRITE_KEY : SEGMENT_DEV_WRITE_KEY,
|
||||
SEGMENT_LEGACY_WRITE_KEY: environment === 'production' ? process.env.SEGMENT_LEGACY_WRITE_KEY : SEGMENT_LEGACY_WRITE_KEY,
|
||||
SEGMENT_LEGACY_WRITE_KEY: environment === 'production' ? SEGMENT_PROD_LEGACY_WRITE_KEY : SEGMENT_DEV_LEGACY_WRITE_KEY,
|
||||
}), {
|
||||
global: true,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user