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.

main
Zed A. Shaw 2 years ago
parent e6e903c982
commit 3c2f6896ec
  1. 2
      commands/build.js

@ -119,7 +119,7 @@ const devMode = () => ({
const options = build.initialOptions; const options = build.initialOptions;
options.define = options.define || {}; 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 // 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'";
} }
}) })

Loading…
Cancel
Save