mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 01:53:55 +00:00
perf: short circuit window type to recuce bundle size
This commit is contained in:
parent
040af4ea4e
commit
bda5805b2d
@ -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"'
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user