fix: Automatically replace vite's process.env.NODE_ENV output in lib mode with the mode

This commit is contained in:
Aaron Klinker
2023-09-19 17:55:25 -05:00
parent f145e00cc9
commit 92039b855e
+4
View File
@@ -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,