Skip to content

Build every configured input CSS, not just the first - #137

Open
Amoifr wants to merge 1 commit into
SymfonyCasts:1.xfrom
Amoifr:fix-78-build-all-input-css
Open

Amoifr wants to merge 1 commit into
SymfonyCasts:1.xfrom
Amoifr:fix-78-build-all-input-css

Conversation

@Amoifr

@Amoifr Amoifr commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #78

runBuild() takes a single input, and the command passed it $this->inputPaths[0], so configuring several input_css files built only the first one. That is why @kniziol's workaround was to run tailwind:build once per file.

You called it a problem upstream, and the binary part is true: Tailwind takes one -i/-o pair per run. The consequence is not that nothing can be done though, only that it needs one run per input, which is what the command now does. It starts a process per configured input and waits on all of them. sass-bundle does not have this problem only because Dart Sass accepts input:output pairs in a single pass.

Two things fall out of it:

  • --watch now covers every input. runBuild() already started the process and returned it, so starting them together and waiting afterwards keeps them all watching, where only the first one was watched before.
  • a failing input no longer hides the others: every input is attempted, and the command fails if any of them did.

Passing input_css explicitly still builds that one file only.

The new test fails on 1.x with second.built.css missing. Suite is green at 50 tests, and php-cs-fixer is clean.

runBuild() takes a single input and the command passed it
$this->inputPaths[0], so configuring several input_css files built only the
first one. The reported workaround was to run tailwind:build once per file.

Tailwind takes one -i/-o pair per run, so the command now starts one
process per configured input and waits on all of them. Starting them
together is also what makes --watch cover every file. An explicit
input_css argument still builds that one file only.
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.

Tailwind stylesheets are not generated for stylesheets other than app.css

1 participant