Skip to content

Commit 20fdc12

Browse files
committed
chore: disable rolldown define process.env.NODE_ENV
1 parent b9ff173 commit 20fdc12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/vite/src/node/build.ts

+5
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,11 @@ async function buildEnvironment(
629629
onwarn(warning, warn) {
630630
onRollupWarning(warning, warn, environment)
631631
},
632+
define: {
633+
...options.rollupOptions.define,
634+
// disable builtin process.env.NODE_ENV replacement as it is handled by the define plugin
635+
'process.env.NODE_ENV': 'process.env.NODE_ENV',
636+
},
632637
// TODO: remove this and enable rolldown's CSS support later
633638
moduleTypes: {
634639
...options.rollupOptions.moduleTypes,

0 commit comments

Comments
 (0)