docs(electron-vite): explain why zod is bundled into preload (P2-17)

This commit is contained in:
ZacharyZhang-NY committed 2026-04-16 22:54:50 -04:00
1 parent 775b10f46e
commit 3c8a593be7
1 file changed
+3
+3
View File
@@ -29,6 +29,9 @@ export default defineConfig({
},
},
preload: {
// zod is bundled into preload because preload runs as sandboxed CJS
// and cannot resolve externalized ESM deps at runtime. Inlining keeps
// IPC Zod validation working inside the preload layer.
plugins: [externalizeDepsPlugin({ exclude: ["zod"] })],
resolve: {
alias: {