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
When adding this plugin, vite startup time goes from ~400ms to ~550ms without config file to ~700ms with config file.
I don't know what causes the first slow down, but for the second one it seems to be how the config is compiled. And caching doesn't seems to help a lot on restart. I think this plugin could use esbuild to bundle the config instead of jiti. I can try a PR if you want.
The text was updated successfully, but these errors were encountered:
Maybe jiti is not a good option for vite-plugin-windicss: jiti runs in cjs mode, and uses require and cjs-format npm package first. But this conflicts with vite. jiti will throw error if a npm package doesn't provide a cjs-format export. Though, we can set env variable JITI_ESM_RESOLVE to get over the error, but this cost too much efforts to debug.
And jiti's transpile cache is disabled in @windicss/config for now. Maybe we should enable it?
When adding this plugin, vite startup time goes from ~400ms to ~550ms without config file to ~700ms with config file.
I don't know what causes the first slow down, but for the second one it seems to be how the config is compiled. And caching doesn't seems to help a lot on restart. I think this plugin could use esbuild to bundle the config instead of jiti. I can try a PR if you want.
The text was updated successfully, but these errors were encountered: