From 5c9718f268d4f7082abf1d94288c60c3b3d26294 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Fri, 25 Feb 2022 12:36:42 -0800 Subject: [PATCH] Hotwire preload.bundle.js to specific NODE_ENV --- scripts/esbuild.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/esbuild.js b/scripts/esbuild.js index c15aeec9182..2c413fdf1d6 100644 --- a/scripts/esbuild.js +++ b/scripts/esbuild.js @@ -23,6 +23,9 @@ const nodeDefaults = { const bundleDefaults = { ...nodeDefaults, + define: { + 'process.env.NODE_ENV': isProd ? '"production"' : '"development"', + }, bundle: true, external: [ '@signalapp/signal-client',