-
Notifications
You must be signed in to change notification settings - Fork 852
feat(tailwind): Smaller bundle size #1124
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
Conversation
|
Converting this into a draft because I need to investigate weather or not this causes issues with builds on Next and in other similar situations that would still require us to have polyfills. |
|
@gabrielmfern can you please request review somewhere here? Also how to use your version of |
704cf46 to
e3508ec
Compare
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
bd3df85 to
70fbde1
Compare
…ilwind component by installing automatically through yalc
…ould be using jsxDEV instead of jsx
|
Closing this in favor of #1383. |

This changes the way we run Tailwind by manually calling out the internal functions they have
to generate the CSS based on the class names that was very inspired by how the Tailwind LSP
server computes styles for the hover.
This different approach allows us to write the code in a bit more readable manner than it was before,
avoid rendering everything twice, and avoid bundling of node-specific code which forced
us into having to bundle polyfills that would cause large dist sizes that are now avoided due to Vite's tree shaking.
This also has the benefit of giving something like a 30% speed bump!
This PR also replaces #1119, which I'll close right now.
Closes #1101, closes #1111
Maybe closes #1105?
Edit February 2024: I also added an
automated-test-next-appthat is built using the Tailwind in the directoryin a way that it reproduces an actual environment to make sure we don't introduce any regressions.