Skip to content

Commit

Permalink
Merge pull request #108 from zazuko/vite-process-env
Browse files Browse the repository at this point in the history
Do not export `process.env`
  • Loading branch information
ludovicm67 authored Jun 13, 2024
2 parents 248e2d0 + 946b0d1 commit 9a860b6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-dingos-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zazuko/spex": patch
---

Replace `process.env` in final builds, to prevent the app to crash.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export default defineConfig({
],
define: {
global: 'window',
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
}
},
resolve: {
alias: {
Expand Down

0 comments on commit 9a860b6

Please sign in to comment.