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

vite build hangs with multiple scss input files when using 'modern-compiler' #18127

Closed
7 tasks done
DKhalil opened this issue Sep 17, 2024 · 2 comments · Fixed by #18128
Closed
7 tasks done

vite build hangs with multiple scss input files when using 'modern-compiler' #18127

DKhalil opened this issue Sep 17, 2024 · 2 comments · Fixed by #18128
Labels
feat: css p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@DKhalil
Copy link

DKhalil commented Sep 17, 2024

Describe the bug

Running npm run build hangs when using multiple .scss files as input. Meaning: it builds successfully but then never exits.

Reproduction

https://github.com/DKhalil/scss-bug-repro

Steps to reproduce

Run npm install then npm run build

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
    Memory: 37.86 GB / 63.71 GB
  Binaries:
    Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.8.3 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.10.0 - C:\Program Files\nodejs\pnpm.CMD
    bun: 1.1.0 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (127.0.2651.74)
  npmPackages:
    vite: ^5.4.1 => 5.4.6

Used Package Manager

npm

Logs

No response

Validations

@hi-ogawa
Copy link
Collaborator

hi-ogawa commented Sep 17, 2024

It looks like sass.initAsyncCompiler is happening twice since optional assignment awaits promise.

compiler ??= await sass.initAsyncCompiler()

@hi-ogawa hi-ogawa added feat: css p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Sep 17, 2024
@ddolcimascolo
Copy link

ddolcimascolo commented Sep 23, 2024

hi everyone, can this be merged and released?
Now that SCSS logs deprecation warnings you can expect users to migrate to the modern-compiler quite fast. I'm currently hit by this hanging problem and using this inline plugin in my configuration file as a workaround, but it's not nice.

{ name: 'close', closeBundle: () => { process.exit(0); } }

Thanks,
David

@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: css p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants