Skip to content

Commit 76ec143

Browse files
committed
fix(import-wrappers): properly handle env variables for production build
1 parent b21bcf2 commit 76ec143

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vite.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ const getPackageNameCamelCase = () => {
1616
let format;
1717

1818
// https://vitejs.dev/config/
19-
export default defineConfig(({ command, mode }) => ({
19+
export default defineConfig(({ command }) => ({
2020
plugins: [vue(), devSSR()],
2121
publicDir: command === 'build' ? false : 'public',
2222
define: {
2323
__DEV__: `${
24-
mode.production
24+
command === 'build'
2525
? `process.env.NODE_ENV === 'development'`
2626
: 'import.meta.env.DEV'
2727
}`,

0 commit comments

Comments
 (0)