-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Vite build config #2
Conversation
FWIW the Angular Vite story is pretty good: https://github.com/analogjs/analog/tree/main/packages/vite-plugin-angular It's maintained by the Analog team, who use it for their metaframework and utilizes the official build tools under the hood. |
Also, and apologies for potentially missing this - what is a "legacy" build. Specifically what changes are there over CJS? |
The |
Legacy transpiled for bundlers that supported lower than ES2020, and therefore were larger files. |
@lachlancollins could we have two Vite config files and pass this as a plugin to one in order to solve this? |
I know it seems hacky/silly to run multiple instances of Vite for different outputs, but isn't that what tsup effectively does as well? |
Oh for sure, I'm just wondering if we should be supporting deprecated bundlers which hold back the ecosystem. Introducing this to something like query would be a major release anyway, so it would be a reasonable time to drop Webpack v4. |
Fair enough! You've got my vote. |
Changes
This PR is the culmination of several attempts at making our builds work in all environments. It started in Rollup, moved to tsup, and is now settling on Vite with plugins. This export contains all the generic settings which all our packages would need.
Limitations
Todo