Performance: Removing the Orphaned Tailwind CSS Browser Runtime (v1.0.68)
Performance: Removing the Orphaned Tailwind CSS Browser Runtime
Release: v1.0.68 · Ticket: PERF-20
Summary
BlockManOS v1.0.68 removes a 271KB orphaned file — public/tailwindcss-browser.js — from the repository and deployment bundle. The file was the full Tailwind CSS CDN/browser runtime build, committed to the public/ directory but never used by the application.
This is a pure performance improvement with no functional changes to any feature.
Background
Tailwind CSS v4 operates as a build-time tool. During the Next.js build process, Tailwind scans your source files, generates only the CSS utility classes that are actually used, and emits a static stylesheet. There is no need for a JavaScript runtime in the browser.
The file public/tailwindcss-browser.js is Tailwind's separate CDN/browser build — intended for rapid prototyping in environments without a build step (e.g. a plain HTML file). It was committed to the repository at some point but:
- Is not imported anywhere in the codebase
- Has no
<Script>tag referencing it - Has no HTML reference of any kind
- Would cause a ~271KB render-blocking script load if accidentally linked in future
What Changed
1. public/tailwindcss-browser.js removed
The 271KB minified runtime has been replaced with a short comment block explaining why the file should not be present, making it clear to any future contributor why this file should not be re-added.
2. .gitignore updated
The entry /public/tailwindcss-browser.js has been added to .gitignore with an explanatory comment:
# Tailwind CSS browser runtime (CDN build) - not used in production.
# Tailwind v4 processes CSS at build time; the 271KB browser runtime
# should never be committed to the public/ directory.
/public/tailwindcss-browser.js
This closes the door on the file being re-introduced — for example, if a developer runs a Tailwind CDN download script locally.
3. /api/health unblocked in middleware.ts
The health-check route (/api/health) is now explicitly bypassed by the authentication middleware. This matches the existing bypass behaviour applied to other internal API routes and ensures infrastructure health checks (load balancers, uptime monitors) are not inadvertently blocked by auth.
Impact
| Metric | Before | After |
|---|---|---|
| Static asset deployment size | +271KB (unused) | −271KB removed |
| Risk of accidental render-blocking script | Present | Eliminated |
.gitignore protection | None | /public/tailwindcss-browser.js ignored |
/api/health accessibility | May be blocked by auth middleware | Explicitly bypassed |
No Action Required
This change is transparent to all users and administrators of BlockManOS. No configuration, environment variables, or deployment steps are affected.