Skip to content
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

Memoized Tailwind config evaluation #6500

Merged
merged 10 commits into from
Oct 9, 2024

Conversation

bkrmendy
Copy link
Contributor

@bkrmendy bkrmendy commented Oct 9, 2024

Problem

The Tailwind config is only accessible inside useTailwindCompilation, which means that the upcoming element style plugins won't be able to access it

Fix

Store the last seen text contents of the Tailwind config file along with the last evaluation result. If the new contents of the Tailwind config file are the same as the last seen contents, the last evaluation result, otherwise, re-evaluate the Tailwind config file, and store it, and return it

Copy link
Contributor

github-actions bot commented Oct 9, 2024

Try me

@bkrmendy bkrmendy changed the title Feature/tailwind config memo getter Memoized Tailwind config evaluation Oct 9, 2024
Copy link

relativeci bot commented Oct 9, 2024

#14659 Bundle Size — 57.74MiB (~+0.01%).

df49f33(current) vs 916e8b9 master#14647(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#14659
     Baseline
#14647
Regression  Initial JS 40.74MiB(~+0.01%) 40.74MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 17.97% 17.95%
No change  Chunks 21 21
No change  Assets 23 23
No change  Modules 4113 4113
No change  Duplicate Modules 213 213
No change  Duplicate Code 27.41% 27.41%
No change  Packages 475 475
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#14659
     Baseline
#14647
Regression  JS 57.73MiB (~+0.01%) 57.73MiB
Improvement  HTML 7.37KiB (-0.25%) 7.39KiB

Bundle analysis reportBranch feature/tailwind-config-memo-get...Project dashboard


Generated by RelativeCIDocumentationReport issue

@bkrmendy bkrmendy marked this pull request as ready for review October 9, 2024 09:02
@bkrmendy bkrmendy merged commit 108b2c2 into master Oct 9, 2024
17 checks passed
@bkrmendy bkrmendy deleted the feature/tailwind-config-memo-getter branch October 9, 2024 10:11
liady pushed a commit that referenced this pull request Dec 13, 2024
## Problem
The Tailwind config is only accessible inside `useTailwindCompilation`,
which means that the upcoming element style plugins won't be able to
access it

## Fix
Store the last seen text contents of the Tailwind config file along with
the last evaluation result. If the new contents of the Tailwind config
file are the same as the last seen contents, the last evaluation result,
otherwise, re-evaluate the Tailwind config file, and store it, and
return it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants