Skip to content

Commit

Permalink
fix: Automatically replace vite's process.env.NODE_ENV output in li…
Browse files Browse the repository at this point in the history
…b mode with the mode
  • Loading branch information
aklinker1 committed Sep 19, 2023
1 parent f145e00 commit 92039b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/build/buildEntrypoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ async function buildSingleEntrypoint(
},
},
},
define: {
// See https://github.com/aklinker1/vite-plugin-web-extension/issues/96
'process.env.NODE_ENV': JSON.stringify(config.mode),
},
};
const entryConfig = vite.mergeConfig(
libMode,
Expand Down

0 comments on commit 92039b8

Please sign in to comment.