Tree Shaking Not Working in Production with Firebase SDK on Vercel #7435
Replies: 3 comments
-
Hi @GorvGoyl! Cool extension! 😄 Some Vercel-config suggestions:
Keep us updated with how you get on! |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think it's due to prefetching routes. Prefetching gets enabled by default on prod. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This discussion was automatically locked because the community moved to a new site. Please join us at vercel.community |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Page to Investigate
chatgptwriter.ai
Steps to Reproduce
I'm facing an issue with tree shaking in my production build. On my homepage, I avoid loading the Firebase Auth SDK to improve performance and page size, only loading it on the login and signup pages.
In development mode, this works perfectly—I can verify by searching the source code and seeing no trace of the Firebase SDK. However, once deployed to Vercel, the Firebase SDK is unexpectedly loaded on the homepage.
Here are the screenshots for reference:
You can verify at https://chatgptwriter.ai
Has anyone else experienced this issue or have any suggestions on how to resolve it?
Beta Was this translation helpful? Give feedback.
All reactions