Skip to content

Commit af45f00

Browse files
committed
AP-449: avoid leaking env variables into build
@yzhoubk reported in Slack that snapshot builds were failing again as in AP-403. upon further investigation, i discovered that vite was dumping our entire environment into the build, which could lead to credential leakage. this scopes to the only environment variable that's needed by vue's reactivity-related internals.
1 parent 2030bd2 commit af45f00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ export default defineConfig({
4444
},
4545
plugins: [vue(), stripDevCSS()],
4646
define: {
47-
'process.env': process.env
47+
'process.env.NODE_ENV': `"${process.env.NODE_ENV}"`
4848
}
4949
})

0 commit comments

Comments
 (0)