Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jan 25, 2025

This PR updates various templates to Tailwind CSS v4 and ensures compatibility across multiple environments. The following changes were made:

  • Upgraded Tailwind CSS to v4 in multiple templates (Cloudflare D1, Node Custom Server, Vercel, etc.)
  • Rebuilt the pnpm-lock.yaml file to update dependencies and ensure consistency.
  • Updated relevant styles and configurations to reflect changes introduced by Tailwind v4.
  • Verified functionality in each template (Cloudflare, Vercel, Node Postgres, etc.) to ensure compatibility.

CSS Import Update Note:

As part of these updates, the import method for the CSS file was changed from:

import stylesheet from "./app.css?url"

to:

import "./app.css"

Reason for the Change:
Previously, using import stylesheet from "./app.css?url"; caused errors in production:

React's minified error:Uncaught Error: Minified React error #418.

Also During the build process, I initially noticed the following log:

✓ 1 asset moved from React Router server build to client assets.

Switching to import "./app.css"; resolves this issue by ensuring the CSS is bundled correctly, allowing the build to complete without errors. The new approach ensures that the application works as expected in production, with the assets properly handled.

Related issue tailwindlabs/tailwindcss#15422

@ghost ghost changed the title Chore/upgrade tailwind v4 Title: Update Templates and Dependencies to Tailwind CSS v4 Jan 25, 2025
@ghost ghost closed this Jan 29, 2025
@ghost ghost changed the title Title: Update Templates and Dependencies to Tailwind CSS v4 Update Templates and Dependencies to Tailwind CSS v4 Jan 29, 2025
@ghost ghost deleted the chore/upgrade-tailwind-v4 branch January 29, 2025 15:40
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants