Unbreak Docker build: switch to @tailwindcss/vite + pin vite^7#1158
Unbreak Docker build: switch to @tailwindcss/vite + pin vite^7#1158elemdos wants to merge 1 commit into
Conversation
Two bugs in vite 8 break the SvelteKit Docker build: 1. vite 8's bundled postcss-import can't resolve bare specifiers, so `@import 'tailwindcss';` errors with ENOENT for `/app/tailwindcss`. 2. vite 8 defaults cssMinify to lightningcss, which rejects @Keyframes inside Svelte's scoped CSS selectors. Use @tailwindcss/vite (canonical Tailwind v4 + Vite setup) so the Tailwind entry never touches vite's broken postcss-import. Pin vite to ^7.3.3 and vite-plugin-svelte to ^6.2.4 via npm overrides to dodge the lightningcss minify regression until upstream lands a fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe PR migrates the Tailwind CSS integration from the PostCSS plugin to Vite by adding the ChangesTailwind Vite Plugin Integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Duplicate of #1150 — force-pushed the rebased fix there. Closing this. |
Summary
@tailwindcss/postcss→@tailwindcss/viteso the Tailwind v4 entry never goes through Vite's postcss-import (broken on vite 8).overridesblock pinningviteto^7.3.3and@sveltejs/vite-plugin-svelteto^6.2.4so Vite 8's lightningcss-by-default minifier doesn't reject@keyframesinside Svelte scoped CSS.postcss.config.cjs.Two vite 8 regressions break
docker compose buildagainstDockerfile:@import 'tailwindcss';errors with ENOENT for/app/tailwindcss.cssMinifyto lightningcss, which rejects@keyframesinside Svelte's scoped CSS selectors.Originally landed on
fix/vite8-tailwind-postcss-importbut stayed unmerged; this branch ports the same fix onto currentmainso the recent dependabot bumps (sveltekit 2.61.1, tiptap 3.24.0, pocketbase 0.27.0, tailwindcss/postcss 4.3.0) are preserved.Reported by Juri on Discord.
Test plan
rm -rf node_modules package-lock.json && npm installsucceedsnpx svelte-kit sync && npx vite --config common.config.js build && npx vite --config app.config.js buildall succeed locally with vite 7.3.5Summary by CodeRabbit