From bda5805b2d8676cb3c1d47381534e955017557b6 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Wed, 4 Nov 2020 03:14:39 +0100 Subject: [PATCH] perf: short circuit window type to recuce bundle size --- packages/nitro/src/rollup.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nitro/src/rollup.config.ts b/packages/nitro/src/rollup.config.ts index 4d7ccbc02b..27fa87e2b4 100644 --- a/packages/nitro/src/rollup.config.ts +++ b/packages/nitro/src/rollup.config.ts @@ -64,7 +64,8 @@ export const getRollupConfig = (config) => { // https://github.com/rollup/plugins/tree/master/packages/replace options.plugins.push(replace({ values: { - 'process.env.NODE_ENV': '"production"' + 'process.env.NODE_ENV': '"production"', + 'typeof window': '"undefined"' } }))