From 3c2f6896ec897141c37430a5b3b5e873187ff732 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sun, 1 Jan 2023 14:00:55 +0700 Subject: [PATCH] The esbuild changed _again_ so now the code you set a variable to is a full string that's output directly. Taht means I had to change it to be a double quoted string so that process.env.DANGER_ADMIN is actually a string. This prevented the client/ from getting the dev tools. --- commands/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/build.js b/commands/build.js index 3785b52..94f6769 100644 --- a/commands/build.js +++ b/commands/build.js @@ -119,7 +119,7 @@ const devMode = () => ({ const options = build.initialOptions; options.define = options.define || {}; // esbuild 0.16 requires this to be a string, but changes it to code so this will be an actual boolean type in the code - options.define['process.env.DANGER_ADMIN'] = options.minify ? "0" : "1"; + options.define['process.env.DANGER_ADMIN'] = options.minify ? "'0'" : "'1'"; } })