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 css not injecting the link tags in remix #10045

Open
vincent-thomas opened this issue Oct 1, 2024 · 2 comments
Open

Vanilla css not injecting the link tags in remix #10045

vincent-thomas opened this issue Oct 1, 2024 · 2 comments

Comments

@vincent-thomas
Copy link

vincent-thomas commented Oct 1, 2024

Reproduction

https://github.com/vincent-thomas/remix-vanilla-extract-css-repro

run in dev mode: "bun run dev"

then run in prod mode "bun run build && bun run start"

System Info

System:
    OS: Linux 6.6 NixOS 24.11 (Vicuna) 24.11 (Vicuna)
    CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
    Memory: 23.62 GB / 31.25 GB
    Container: Yes
    Shell: 5.9 - /run/current-system/sw/bin/zsh
  Binaries:
    Node: 22.8.0 - /nix/store/xsrv93rg8vi05k9ig6v9mcvcyn01n6n2-nodejs-22.8.0/bin/node
    npm: 10.8.2 - /nix/store/xsrv93rg8vi05k9ig6v9mcvcyn01n6n2-nodejs-22.8.0/bin/npm
    bun: 1.1.29 - /nix/store/mqzlk40bnhx54by2m4lyyc02syippzad-bun-1.1.29/bin/bun
  npmPackages:
    @remix-run/dev: ^2.12.1 => 2.12.1
    @remix-run/node: ^2.12.1 => 2.12.1
    @remix-run/react: ^2.12.1 => 2.12.1
    @remix-run/serve: ^2.12.1 => 2.12.1
    vite: ^5.1.0 => 5.4.8

Used Package Manager

bun

Expected Behavior

For the vanilla css styles corresponding link tag to be generated into the html in prod mode

Actual Behavior

This is not the case. Vanilla extract generates the css files, but does not inject the link tags in the html files. This has been tested on other vite projects and remix is the only one to fail

@askoufis
Copy link

askoufis commented Oct 3, 2024

As mentioned in vanilla-extract-css/vanilla-extract#1479, the issue seems to be that remix is stripping side-effect imports for some reason. Regular imports of Vanilla Extract styles are unaffected.

@vincent-thomas
Copy link
Author

As mentioned in vanilla-extract-css/vanilla-extract#1479, the issue seems to be that remix is stripping side-effect imports for some reason. Regular imports of Vanilla Extract styles are unaffected.

Yes, and i should add that the package manager should not be relevant for this issue.

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

3 participants