Skip to content

Commit 5f556aa

Browse files
committed
update vite build options to fix require showing up in prod
1 parent 4c0fafa commit 5f556aa

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

apps/client/vite.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,17 @@ const config = defineConfig({
2727
],
2828
}),
2929
],
30+
build: {
31+
commonjsOptions: {
32+
transformMixedEsModules: true,
33+
},
34+
},
35+
optimizeDeps: {
36+
esbuildOptions: {
37+
define: {
38+
global: "globalThis",
39+
},
40+
},
41+
},
3042
})
3143
export default config

0 commit comments

Comments
 (0)