SPA mode monorepo not building: "Cannot access 'pg' before initialization"
When I run
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-bugGitHub
GitHub - rohanajayjain/ts-start-bug
Contribute to rohanajayjain/ts-start-bug development by creating an account on GitHub.
0 Replies