wxt
wxt copied to clipboard
[Ongoing] Reduce Package Size
Feature Request
This is an ongoing ticket around reducing the size of WXT. WXT alone is only 760kb. However, when including all it's dependencies, it's 110mb. I'd like to reduce that number.
https://pkg-size.dev/wxt (sort by "Package Size" or "Dependency Size" for best view IMO)
Some ideas:
- #1045 (~20mb)
- #1037
- Minimize
publish-browser-extension, another repo I own (~1mb) - Stay inside the unjs ecosystem when possible
- Write custom version of
web-ext- I already have a fork,web-ext-run, that's smaller (65mb → 26mb). Not sure if I want to start maintaining this... But if we did, we could make firefox support a separate package you have to install, making types much smaller. - #1050
Add #1050 to le list
It also had me concerned that adding wxt to my package added over 5k lines to my package lock. Could this also be reduced? Could the UI frameworks that are supported by wxt be responsible for this? If so, could their dependencies be removed or made optional?
It also had me concerned that adding wxt to my package added over 5k lines to my package lock. Could this also be reduced?
5K lines ain't bad. Adding a single AWS SDK package results in 10k lines added. I'm more concerned about the space taken up by the node_modules.
Could the UI frameworks that are supported by WXT be responsible for this? If so, could their dependencies be removed or made optional?
The wxt package doesn't directly depend on any UI frameworks, and the modules that add support for UI frameworks only directly depend on the vite plugins. They have peer dependency requirements for the UI frameworks. So "could their dependencies be removed or made optional?" They already are.