Skip to content

Commit

Permalink
fix(vite): production build uses development variables
Browse files Browse the repository at this point in the history
Vite bundles for production when `NODE_ENV=production`, which makes variables like `import.meta.env.DEV` equal to `true` even for production environments.
  • Loading branch information
skyrpex committed Feb 19, 2024
1 parent 6fd317d commit c91b26e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vite/vite.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports.build = (options) => {
env: {
HOME: options.homeEnv,
PATH: options.pathEnv,
NODE_ENV: "production",
},
});
const output = buffer.stdout.toString().split("\n");
Expand Down

0 comments on commit c91b26e

Please sign in to comment.