Skip to content

SWF(refactor): run Tailwind through the Vite plugin only - #819

Open
suree33 wants to merge 1 commit into
mainfrom
devin/1795146200-tailwind-vite-only
Open

suree33 wants to merge 1 commit into
mainfrom
devin/1795146200-tailwind-vite-only

Conversation

@suree33

@suree33 suree33 commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Tailwind ran twice: @tailwindcss/vite in astro.config.mjs and @tailwindcss/postcss in postcss.config.mjs. This removes the PostCSS copy (and its dependency), leaving the Vite plugin that the official Astro + Tailwind v4 docs recommend. The emitted CSS is byte-identical.

-import tailwindcss from '@tailwindcss/postcss';
 import postcssNesting from 'postcss-nesting';
 export default {
-  plugins: [tailwindcss, postcssNesting],
+  plugins: [postcssNesting],
 };

postcss-nesting stays; @tailwindcss/postcss and its exclusive transitive dep @alloc/quick-lru are removed from package.json / pnpm-lock.yaml (pnpm install --frozen-lockfile → "Lockfile is up to date").

Evidence

pnpm run build:ci on main (e693614) and on this branch, both 46 pages. Every emitted .css file compared:

CSS directory and SHA-256 manifest diffs: identical (exit 0)
c561c548cb46c8bd53082401afb7093237f3f4f89a55a74151bb9cb6fa8e3435  ./_astro/BaseLayout.CwrRLh1j.css
./_astro/BaseLayout.CwrRLh1j.css: OK
Check Result
pnpm run lint 0 errors, 0 warnings
pnpm run test:unit 132 passed
pnpm run test:integration (Worker, incl. CSS asset serving) 7 passed
pnpm run test:worker 73 pass, 0 fail
Prettier all files formatted

Try it: pnpm run build:ci && (cd dist && sha256sum _astro/*.css) → same hash as on main.

Not tested

Inline <style> CSS in HTML and browser visuals were not compared separately (the bundled CSS file is identical). No build-time speedup is claimed.


Software Factory opened this PR for Daiki
Implemented in session Run Tailwind through Vite plugin only
Review with Devin · Open in Devin Desktop


Co-Authored-By: Daiki Sato <d@sur33.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bad7d7f5-4073-4712-b55c-6dedc9e03599
Commits

Reviewing files that changed from the base of the PR and between e693614 and 1b91dab.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 2

  • package.json
  • postcss.config.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
blog 1b91dab Commit Preview URL

Branch Preview URL
Nov 20 2026, 03:49 AM

@devin-ai-integration

Copy link
Copy Markdown
Contributor

QA: PASS — no visual difference from main

I compared 1b91dab (this PR) with the merge-base e693614, both built with build:ci and served side by side in Chromium with Noto CJK fonts.

Check Result
Emitted CSS (_astro/BaseLayout.*.css) byte-identical (SHA-256 c561c548…)
Inline <style> in HTML no difference (47/48 files identical; the remaining file differs only in link-card OG fetches)
Full-page pixel diff: /, a post (code block, table, 8 link cards), /tags/Obsidian/, /about/, 404 × desktop 1280 / mobile 390 × light / dark 0 differing pixels in all 20
Site theme toggle (desktop, plus mobile with the menu open) and mobile menu 0 differing pixels in all 6
Manual walkthrough (recording below) layout, typography, colors, and the menu match

Failures: none.

Not from this PR: /about/ logs a 404 for /_astro/daiki-sato-xzItvPFgpBQ-unsplash.* under astro preview on both base and PR. The image still shows.

Not checked: WebKit/Safari, and the Cloudflare Workers preview deploy.

Walkthrough recording

Chaptered recording

Written by Devin

This branch has not been deployed

No deployments
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.

1 participant