-
Notifications
You must be signed in to change notification settings - Fork 185
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
Slow nuxt build! what should I do? #188
Comments
I have the same problem. There will be a white screen when scrolling the webpage in safari. package.json
nuxt.config.js
tailwind.config.js
Can be solved with this method |
We aware of this issue and actually this is directly related to TailwindCSS: tailwindlabs/tailwindcss#2544 We are actually thinking of a way to accelerate the development build and hot module replacement, the idea would be to generate the CSS manually with the Tailwind config and PostCSS when loading the module, then inject the CSS once to we bypass the PostCSS plugin for Tailwind, but may have side effects. |
Just to chime in - isn't it also a case where separating tailwindcss imports from tailwind.css file would help? According to https://nystudio107.com/blog/speeding-up-tailwind-css-builds (mentioned in the issue you linked before) would suggest that splitting imports into separate entry points would speed up recompilation on change. I don't know how it works underneath, but I can image that |
After getting to So my workaround was to never do Not sure where I got that line from. If you purge, you want to purge in production and development. If a CSS class is missing because of the purge, you want it to happen in both environments and the correct purge settings should work on development as well. At least my four-pager became usable again after HMR pushes and the initial CSS is only about 2MB with sourcemaps. The initial build still takes forever and memory usage is still of the charts though. |
I also found some performance problems migrating from tailwind 1.x to 2.x In my case, it was related to using I created this issue on the tailwind repo tailwindlabs/tailwindcss#3717 and the following PR tailwindlabs/tailwindcss#3718 . I am waiting for the tailwind team feedback |
Without Tailwindcss
With Tailwindcss
tailwindcss css
tailwindcss config js
nuxt config js
HELP HELP
The text was updated successfully, but these errors were encountered: