You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The build can get quite slow if there are a lot of .css.ts files, even on rebuilds, and even when changing non-VE files. We need to add caching to address this.
Vanilla Extract core currently compiles each .css.ts file using esbuild before evaluating it. Other bundlers in watch mode don't recompile the file if it or any of its affected files haven't changed. However, esbuild is different in that it leaves caching entirely up to plugins and re-runs everything on each rebuild which is why perf issues are more pronounced for us.
We want to cache the results of each .css.ts file but there's no way to generate a cache key just by looking at the .css.ts entry point since it imports other modules. To fix this the Vanilla Extract compile + eval step needs to migrate from esbuild + eval to vite-node so that Vite can cache the module graph for us as part of its eval step. We can even share the cache between server and client builds which is really nice.
The text was updated successfully, but these errors were encountered:
We just published version v0.0.0-nightly-bf9d0a9-20230314 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!
PR: #5735
The build can get quite slow if there are a lot of
.css.ts
files, even on rebuilds, and even when changing non-VE files. We need to add caching to address this.Vanilla Extract core currently compiles each
.css.ts
file using esbuild before evaluating it. Other bundlers in watch mode don't recompile the file if it or any of its affected files haven't changed. However, esbuild is different in that it leaves caching entirely up to plugins and re-runs everything on each rebuild which is why perf issues are more pronounced for us.We want to cache the results of each
.css.ts
file but there's no way to generate a cache key just by looking at the.css.ts
entry point since it imports other modules. To fix this the Vanilla Extract compile + eval step needs to migrate from esbuild + eval to vite-node so that Vite can cache the module graph for us as part of its eval step. We can even share the cache between server and client builds which is really nice.The text was updated successfully, but these errors were encountered: