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/vite-plugin@4.0.4 hangs Vite build #1408

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

@vanilla-extract/vite-plugin@4.0.4 hangs Vite build #1408

emondpph opened this issue May 5, 2024 · 3 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.

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

2 participants