-
Notifications
You must be signed in to change notification settings - Fork 62
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
cache within single synchronous transform #80
Comments
I don't think it largely affects performance as disk cache is being used (and native items are usiy require cache still) |
I think disk cache is also switched off. |
A quick test showed that enabling require cache for a fresh new nuxt project changed load time of |
Let me double check but seems by bad disabling disk cache for c12 by default. |
Issue should be resolved with next version of c12 by enabling disk cache, latest version of jiti by not transpilinig typescript (and custom option to extend) and nuxt.config issue nuxt/nuxt#14821. I like the idea of having an in memory cache but if disk cache works properly and we do not transpile unnecessary ids, this is probably not necessary and have it's own drawbacks as cache is isolated per instance. Closing issue for now but let's revise it later if really there is something we can only fix in jiti level by introducing new caching mechanism. Thanks for making issue btw it was good initiative. |
Update - config file loading for first file is now approx |
On jiti issue, in a fresh Nuxt project, it transpiles the same dependency up to 16x different times because we have set
requireCache: false
in c12 - almost certainly for proper HMR? Is there an intermediate step that might preserve cache within an single synchronous instance of jiti('some file'), perhaps?Sorted list of dependencies transpiled in a fresh nuxt 3 project in order to read the `nuxt.config`
The text was updated successfully, but these errors were encountered: