Skip to content

apps/console and examples/byo-backend-console still track a tailwind.config.* that Tailwind 4 never reads — v3 content arrays, zero @config in the repo #4066

Description

@yinlianghui

Out-of-scope finding from implementing #3891 (PR #4064). Not fixed there — #3891's declared surface is packages/cli/src/commands/doctor.ts only.

Fact (verified on origin/main @ 11c1e71)

Two tailwind.config.* files are tracked in this repo, and both are inert under Tailwind 4:

  • apps/console/tailwind.config.js
  • examples/byo-backend-console/tailwind.config.ts

Both declare a v3-shaped content array (['./index.html', './src/**/*.{ts,tsx}']) plus theme.extend and plugins. Tailwind 4 loads a JS config only when a stylesheet opts in with @config, and @config has zero occurrences across every .css file in the repo (counter-probe that the scan works: @import 'tailwindcss' matches in 8 stylesheets, including both of these apps' own src/index.css). So neither file's theme, content paths, or plugins have any effect today.

Incidental, and only reachable if the file were ever loaded: apps/console/tailwind.config.js is a .js file containing TypeScript syntax — import type { Config } from 'tailwindcss'; and satisfies Config. It would be a parse error the moment anything tried to read it. Its inertness is currently what hides that.

Why this matters enough to record

This is the exact shape #3891 was about, one layer down. The pre-fix objectui doctor graded these two files on their content array and answered ✓ Tailwind content paths configured for both — a green tick on a dead file. Measured before/after in apps/console:

before (origin/main): ✓ tailwind.config.js found
✓ Tailwind content paths configured
Everything looks good! ✨
after (PR #4064): ⚠️ tailwind.config.js exists but nothing opts into it —
Tailwind 4 ignores a JS config unless a stylesheet
declares `@config` ...

So after #4064 the condition is reported, but the files themselves are still there. The remaining work is the disposition: delete each file and move anything it genuinely sets into that app's CSS entry (@theme / @source), or add @config where the settings are actually wanted. Both apps already carry a working v4 CSS entry with @source directives, which suggests deletion, but that is a judgement about those two apps and not mine to make from #3891.

Observation-class, not a live defect

Nothing a user hits today: both apps build and style correctly, precisely because the files are ignored. This is dead configuration left over from the v4 migration, so it is filed as a finding with no pm:queue and left for triage to grade.

Not a duplicate of #3892

#3892 covers a tailwind.config.js in the objectui init scaffold — generator output, app-generator.ts. This is about two files tracked in this repo's own tree. Different surface, different fix, no overlap in files.

Search performed

Open issues, three passes: tailwind.config (#3883 docs pages, #3891 doctor), tailwindcss postcss (#3891, #4062, #3892, #3883, #3884), postcss config root autoprefixer (0 hits). Nothing covers these two tracked files.


Generated by Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions