Skip to content
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

Significant Sass build time difference between Nuxt and Vite #20533

Closed
miosenpai opened this issue Apr 26, 2023 · 3 comments · Fixed by #23975
Closed

Significant Sass build time difference between Nuxt and Vite #20533

miosenpai opened this issue Apr 26, 2023 · 3 comments · Fixed by #23975

Comments

@miosenpai
Copy link

Environment

------------------------------
- Operating System: Linux
- Node Version:     v16.14.2
- Nuxt Version:     3.4.2
- Nitro Version:    2.3.3
- Package Manager:  npm@7.17.0
- Builder:          vite
- User Config:      -
- Runtime Modules:  -
- Build Modules:    -
------------------------------

Reproduction

Nuxt Project: https://stackblitz.com/edit/github-4zwpte
Vite Project: https://stackblitz.com/edit/github-soapej

Describe the bug

While working on a Nuxt project, I noticed the project's start up time increased significantly (from a few hundred ms to 9000ms+) after I imported a Sass library. I originally thought this was from the Sass compiler being slow in general but after replicating the same setup in a standalone Vite project I saw very little increase to its start up time, leading me to consider if the performance hit could be Nuxt specific.

Something else I noticed is that with DEBUG=*, the Nuxt project logged additional .scss entries and the entries also took more time compared to the Vite project (although this could be intended behavior?).

Additional context

I tried disabling CSS sourcemaps in the Nuxt project after finding vitejs/vite#8656 (comment) using sourcemap: false in nuxt.config.ts (#18446), but this didn't seem to help.

I was also able to reproduce the slowdown with other Sass libraries like bootstrap/scss/bootstrap.scss.

Logs

No response

@PixsaOJ
Copy link

PixsaOJ commented Dec 24, 2023

So is this issue fixed? Or do we know the problem?

@manniL
Copy link
Member

manniL commented Dec 24, 2023

Should be fixed since 3.8.1, yes.

@PixsaOJ
Copy link

PixsaOJ commented Dec 24, 2023

Well, I am on "3.8.2" soo...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants