SPA mode monorepo not building: "Cannot access 'pg' before initialization"
pnpm build I get ReferenceError: Cannot access 'pg' before initialization.When I add
ssr: { external: ['pg'] } to my vite config, it says:I can't tell if this is a bug or an error with my code. Dev mode seems to work fine.
Anyone run into a similar issue?
Minimal reproduction: https://github.com/rohanajayjain/ts-start-bug