Vite Production Bundle

in production bundle ready signal doesnot change, but in development it fires correctly
4 Replies
Madaxen86
Madaxen863mo ago
Code looks fine. Does initCustomCachePersistence resolve successfully? Missing env variable?
stardust
stardustOP3mo ago
Yes it resolves perfectly, what is more confusing, is it all works perfectly in dev but not prod
Seb
Seb3mo ago
What about env variables? On my side I noticed that the build and start scripts do not take into account a .dev file as the dev script does. I cannot find into the doc how to use env variables in production, maybe it comes from that?
Madaxen86
Madaxen863mo ago
Vinxi only includes .env files in dev. For prod you need to use a package like dotenv-cli https://discord.com/channels/722131463138705510/1392239826354569246/1392245828328099893

Did you find this page helpful?