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

@vanilla-extract/[email protected] hangs Vite build #1408

Open
2 tasks done
emondpph opened this issue May 5, 2024 · 8 comments
Open
2 tasks done

@vanilla-extract/[email protected] hangs Vite build #1408

emondpph opened this issue May 5, 2024 · 8 comments
Labels
bug Issue is caused by a bug in a Vanilla Extract package vite Issue related to vite

Comments

@emondpph
Copy link

emondpph commented May 5, 2024

Describe the bug

I am experiencing an issue upgrading the @vanilla-extract/vite-plugin to version 4.

It seems the commit in 4.0.4 creates an issue on my end where Vite build will succeed (generated CSS is OK) but the Vite process itself does not close. I need to force close the Vite process (CTRL-C)

The release which seems to be problematic on my end: https://github.com/vanilla-extract-css/vanilla-extract/releases/tag/%40vanilla-extract%2Fvite-plugin%404.0.4

This bug was not happening in version 3.9 or 4.0.3.

Reproduction

.

System Info

System:
    OS: macOS 13.5.2
    CPU: (12) arm64 Apple M2 Pro
    Memory: 210.06 MB / 16.00 GB
    Shell: Unknown - /bin/ksh
  Binaries:
    Node: 18.18.0 - /opt/homebrew/opt/node@18/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.8.1 - /opt/homebrew/opt/node@18/bin/npm
    bun: 1.0.7 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 124.0.6367.119
    Safari: 16.6
  npmPackages:
    vite: ^5 => 5.2.11

Used Package Manager

npm

Logs

No response

Validations

@emondpph
Copy link
Author

emondpph commented May 5, 2024

I seem to be able to fix the hanging by adding line 105 within the code of the vite-plugin. My Vite configuration is having two plugin: @rollup/plugin-typescript (for generating DTS files) and Vanilla Extract.

Not sure what is happening here...

Capture d’écran, le 2024-05-04 à 23 53 53

@askoufis
Copy link
Contributor

askoufis commented May 5, 2024

Usually when you tick the box that says The provided reproduction is a minimal reproducible example of the bug, you provide some sort of minimal reproduction.

I have made a repo with my own reproduction.

@askoufis askoufis added vite Issue related to vite bug Issue is caused by a bug in a Vanilla Extract package and removed pending triage labels May 5, 2024
@emondpph
Copy link
Author

emondpph commented May 5, 2024

Hey @askoufis, sorry about that. It was late and I focused more on finding the issue in the vite-plugin code and which version the problem started to appear. Thanks for creating the repo with reproduction.

I can tell that this seems to be an incompatiblity with @rollup/plugin-typescript, but the why I'm not sure.

Replacing @rollup/plugin-typescript with https://github.com/qmhc/vite-plugin-dts also fixes the hanging.

@gkiely
Copy link

gkiely commented Jun 27, 2024

I'm also running into this issue, it's causing another plugin to hang. 3.9.5 is the last working version.

@NHNkimjaemin
Copy link

Any updates on this? Same issue here and downgrading to 4.0.3 solved this.

@dadajam4
Copy link

I am facing the same issue. I am avoiding it by fixing the version to 3.9.5.

@MatthijsBon
Copy link

Is there any progress here?

@benasradzevicius9404
Copy link

Same here, but for some reason, the issue for me was only inside of a docker. Running locally, - it worked fine (under 10sec build) while inside of a docker, I've started getting extremely long load and transform steps and whole build results in out of memory (after ~7mins):

image

Reverting it back to 3.9.5 solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is caused by a bug in a Vanilla Extract package vite Issue related to vite
Projects
None yet
Development

No branches or pull requests

7 participants