-
Notifications
You must be signed in to change notification settings - Fork 189
Open
Description
In a fresh Rails 8 project using tailwind
and esbuild
, the browser always tries to request a non-existent asset:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3000/assets/tailwindcss
Tailwind itself is working correctly (classes apply, CSS compiles).
But this extra GET request to /assets/tailwindcss
fails with 404 on every page load.
Steps to reproduce
rails new railstailwindbug \
--javascript=esbuild \
--css=tailwind
cd railstailwindbug
bin/dev
Then open http://localhost:3000/
Check the browser console → you’ll see the 404 for /assets/tailwindcss.
Expected behavior
No request to /assets/tailwindcss should be made, since the file does not exist.
Only the compiled Tailwind CSS should be loaded.
Actual behavior
Every page load triggers a GET request to /assets/tailwindcss
, which fails with:
GET http://localhost:3000/assets/tailwindcss 404 (Not Found)
This issue persists even when deploying the app using the official Dockerfile and Kamal.
Environment
- Rails: 8.0.2.1
- M4 Mac Max
- Happens when running locally with
bin/dev
- Also happens when deployed with kamal on an AMD VPS
Metadata
Metadata
Assignees
Labels
No labels