You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably what you want is esbuild.legalComments: "linked", but unfortunately this is not supported for Vite build since Vite uses esbuild to trasnform individual files chunks.
Description
This is something between a bug and a feature I guess, but I notice that my JS bundle contains a lot of similar license code comments.
Sample: https://stackblitz.com/edit/vitejs-vite-k6vbhh?file=dist%2Fassets%2Findex-trimmed.js
After removing these with
uglify-js
I see about 20% file size decrease.While these licenses are important, my average website visitor won't really bat an eye about this.
Suggested solution
I'm wondering if Vite could extract all the comments and place them into a
license.txt
file and link that in my bundled.js instead.Alternative
I guess I can do post processing myself to deal with this.
Additional context
The
firebase
package does seem to bring a lot of very similar Google licenses. So you only have this problem based on what packages you use.Validations
The text was updated successfully, but these errors were encountered: