Large Bundle Size Differences between Webpack and Vite for Firebase JS SDK #12310
Replies: 2 comments 5 replies
-
Don't know about Webpack (been a while since I used it...), but Vite does not drop legal comments from the bundle by default.
There are few options for the legalComments field - documentation available at https://esbuild.github.io/api/#legal-comments |
Beta Was this translation helpful? Give feedback.
-
I've upgrade from webpacker to vite, there is a huge difference in the final build with webpacker and vite, it was 200kb with webpakcer now it;s almost 700kb |
Beta Was this translation helpful? Give feedback.
-
Hi Team,
A user raised firebase/firebase-js-sdk#7063 to discuss large bundle sizes when using the Firebase JS SDK. I compared the bundle sizes between webpack and vite with the code provided by the user and noticed vite's bundle was consistently larger than webpacks when using the default configuration. Is there anything the JS Firebase SDK needs to change to be optimized for vite or do we just need to advice users on the proper vite configuration? Based on what you are seeing, is there a configuration we should point users to?
This did not appear to be limited to the messaging package as I had previously done an experiment between the different versions and tools.
<style type="text/css"></style>
Beta Was this translation helpful? Give feedback.
All reactions