perf: short circuit window type to recuce bundle size

This commit is contained in:
Pooya Parsa 2020-11-04 03:14:39 +01:00
parent 040af4ea4e
commit bda5805b2d

View File

@ -64,7 +64,8 @@ export const getRollupConfig = (config) => {
// https://github.com/rollup/plugins/tree/master/packages/replace // https://github.com/rollup/plugins/tree/master/packages/replace
options.plugins.push(replace({ options.plugins.push(replace({
values: { values: {
'process.env.NODE_ENV': '"production"' 'process.env.NODE_ENV': '"production"',
'typeof window': '"undefined"'
} }
})) }))