Skip to content

Commit

Permalink
Memoized Tailwind config evaluation (#6500)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
bkrmendy authored Oct 9, 2024
1 parent 0924afe commit 108b2c2
Show file tree
Hide file tree
Showing 8 changed files with 274 additions and 181 deletions.
1 change: 1 addition & 0 deletions editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@
"source-map-loader": "0.2.3",
"string-replace-loader": "2.2.0",
"style-loader": "0.18.2",
"tailwindcss": "^3.4.13",
"tar": "6.0.5",
"terser-webpack-plugin": "5.3.9",
"three": "0.140.2",
Expand Down
39 changes: 5 additions & 34 deletions editor/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 108b2c2

Please sign in to comment.