Open cobaltt7 opened 2 years ago
Hello @RedGuy12. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it!
Clear and concise description of the problem
Babel allows specifying compiler assumptions for smaller code output, see https://babeljs.io/docs/en/assumptions. However,
@vitejs/plugin-legacy
doesn't allow these options to be enabled.Suggested solution
Add an option called
assumptions
and pass it to Babel.I noticed this in the contributing guildlines:
I think it's ok here since
@vitejs/plugin-legacy
doesn't have too many options right now.Yes, this option could significantly reduce output size
Possibly...we could set the
assumptions
to those that work well with Vite but that might not work with users' code.No.
No.
Alternative
No response
Additional context
I'd be willing to make a PR for this except I am not familliar with Jest nor pnpm.
Validations