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
Make the dep optional leaving the functionality as-is. If the user doesn't include a cert, we'll ask them to install node-forge.
Move the auto-generated HTTP cert logic to a new @vitejs/plugin-basic-ssl. See comment from @dominikg here fix: pregenerate https certificate #6173 (comment). Add documentation to explain how to properly generate certs and do a proper SSL setup (and link to the basic SSL plugin as an option, but not even the best)
I think 2. is better here. Opening the issue in case someone wants to work on it, I'll get to it if not before v3.
Interesting. It looks like the library is quite actively maintained. @winderica this seems like a good option to reduce the size, we could discuss it in a PR to see how it works.
For v3, it is still important to do option 1 or 2 so we also avoid the extra 570kb (it is half of node-forge) but still big compared to the current size of Vite. So the priority should be to do that, but you can work in parallel to improve 1 or 2 if you would like to do that.
Thanks for this data @sapphi-red. Maybe we should wait for swapping node-forge once we can drop Node 14? The package size diff is still not bad though (a ~6% drop).
I think I would feel a lot more comfortable with doing this change if we move certificate.ts to its own plugin, and swap node-forge there.