From 29783b53d36f5ab351009f50e0548367e0523d4d Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Mon, 6 Feb 2023 13:13:42 +0100 Subject: [PATCH] Minify studio --- theatre/devEnv/createBundles.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/theatre/devEnv/createBundles.ts b/theatre/devEnv/createBundles.ts index 474f93d..db70aec 100644 --- a/theatre/devEnv/createBundles.ts +++ b/theatre/devEnv/createBundles.ts @@ -46,6 +46,11 @@ export function createBundles(watch: boolean) { esbuildConfig.mainFields = ['browser', 'module', 'main'] esbuildConfig.target = ['firefox57', 'chrome58'] esbuildConfig.conditions = ['browser', 'node'] + } else { + esbuildConfig.define!['process.env.NODE_ENV'] = + JSON.stringify('production') + + esbuildConfig.minify = true } build({