-
Notifications
You must be signed in to change notification settings - Fork 589
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(tailwind): Smaller bundle size #1124
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gabrielmfern
changed the title
feat(tailwind): Manually running Tailwind's specific features
feat(tailwind): Manually run Tailwind's specific features
Jan 3, 2024
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 |
gabrielmfern
force-pushed
the
feat/decrease-tailwind-bundle-size
branch
from
January 22, 2024 15:42
704cf46
to
e3508ec
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
gabrielmfern
changed the title
feat(tailwind): Manually run Tailwind's specific features
feat(tailwind): Smaller bundle size
Jan 22, 2024
antoineharel
approved these changes
Jan 23, 2024
gabrielmfern
force-pushed
the
feat/decrease-tailwind-bundle-size
branch
from
January 23, 2024 10:46
bd3df85
to
70fbde1
Compare
…ilwind component by installing automatically through yalc
…ould be using jsxDEV instead of jsx
gabrielmfern
requested review from
vcapretz
and removed request for
bukinoshita
February 29, 2024 14:52
vcapretz
reviewed
Feb 29, 2024
Closing this in favor of #1383. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-app
that 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.