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 plugin changes config for other plugins #1454

Open
2 tasks done
Spaubleit opened this issue Jul 31, 2024 · 0 comments
Open
2 tasks done

Vite plugin changes config for other plugins #1454

Spaubleit opened this issue Jul 31, 2024 · 0 comments

Comments

@Spaubleit
Copy link

Describe the bug

When I add vanillaExtractPlugin() to my config, other plugins start getting incorrect config values.
For example vite-plugin-relay-lite gets command: "serve" in production build. It leads to indefinitely blocked build.

Maybe it is related to #1408 because switching plugin version to 3.9.5 fixes the issue.

You can check it out in my reproduction repository.
When I run build without vanillaExtractPlugin I get next console output:

yarn run v1.22.22
$ vite build
config build
plugin build
vite v5.3.5 building for production...
✓ 7 modules transformed.
dist/index.html                 0.45 kB │ gzip: 0.29 kB
dist/assets/index-BfibREyH.css  1.21 kB │ gzip: 0.63 kB
dist/assets/index-BLvcXRAk.js   2.59 kB │ gzip: 1.38 kB
✓ built in 68ms
Done in 0.32s.

But with plugin I get another set of logs:

yarn run v1.22.22
$ vite build
config build
plugin build
vite v5.3.5 building for production...
config build
plugin serve
✓ 7 modules transformed.
dist/index.html                 0.45 kB │ gzip: 0.29 kB
dist/assets/index-BfibREyH.css  1.21 kB │ gzip: 0.63 kB
dist/assets/index-BLvcXRAk.js   2.59 kB │ gzip: 1.38 kB
✓ built in 111ms
Done in 0.42s.

Hope this helps to find the issue.

Reproduction

https://github.com/Spaubleit/vanilla-extract-vite-config-bug

System Info

System:
    OS: Linux 6.6 NixOS 24.11 (Vicuna) 24.11 (Vicuna)
    CPU: (24) x64 AMD Ryzen 9 3900 12-Core Processor
    Memory: 47.64 GB / 62.70 GB
    Container: Yes
    Shell: 5.2.26 - /nix/store/4vdlf7sg4cdv6xlfmhyi3ziir3s8yxsg-bash-interactive-5.2p26/bin/bash
  Binaries:
    Node: 20.12.2 - /nix/store/74a6mmrgxzcg9axl1gmdz3j2y1bjd13f-nodejs-20.12.2/bin/node
    Yarn: 1.22.22 - /etc/profiles/per-user/spaubleit/bin/yarn
    npm: 10.5.0 - /nix/store/74a6mmrgxzcg9axl1gmdz3j2y1bjd13f-nodejs-20.12.2/bin/npm
  npmPackages:
    @vanilla-extract/vite-plugin: ^4.0.13 => 4.0.13 
    vite: ^5.3.4 => 5.3.5

Used Package Manager

yarn

Logs

No response

Validations

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

No branches or pull requests

1 participant