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

"Could not load css" #18817

Closed
7 tasks done
nickretallack opened this issue Nov 28, 2024 · 1 comment
Closed
7 tasks done

"Could not load css" #18817

nickretallack opened this issue Nov 28, 2024 · 1 comment

Comments

@nickretallack
Copy link

nickretallack commented Nov 28, 2024

Describe the bug

If you generate a new remix app and upgrade to vite@6 and run remix vite:dev, it has a problem with loading CSS files on the server side. It will print
Could not load /Users/me/my-remix-app/app/tailwind.css to the console and the page will initially display unstyled, but then it will load the CSS file eventually anyway. This proves that it can see the file, but is having some sort of problem in the initial server side rendering. It works fine with vite@5 so this is a regression.

The repro steps are very simple so I don't think a reproduction link is necessary. I can't reproduce the problem without using Remix. Should this issue be reported on Remix instead of Vite?

Reproduction

(just follow the repro steps)

Steps to reproduce

bunx create-remix@latest
cd my-remix-app
bun add -d vite@6
bun --bun remix vite:dev

View it in your browser.
Notice there is a flash of unstyled content every time you refresh.
Each time, it will print this to the console:
Could not load /Users/me/my-remix-app/app/tailwind.css

System Info

System:
    OS: macOS 15.1.1
    CPU: (8) arm64 Apple M1
    Memory: 94.38 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.10.0 - ~/.nvm/versions/node/v16.10.0/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v16.10.0/bin/yarn
    npm: 7.24.0 - ~/.nvm/versions/node/v16.10.0/bin/npm
    bun: 1.1.37 - ~/.bun/bin/bun
  npmPackages:
    vite: 6 => 6.0.1

Used Package Manager

bun

Logs

Could not load /Users/me/my-remix-app/app/tailwind.css

Validations

@hi-ogawa
Copy link
Collaborator

Can your ask Remix / react-router for Vite 6 support? There are a few breaking change which needs to be addressed by framework. As far as I can tell, they still have peer dev with Vite 5, so I would imagine you have peer dep warning if you try Vite 6.

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

2 participants