|
|
|
@ -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, |
|
|
|
|
}) |
|
|
|
|