Skip to content

Conversation

thewatts
Copy link

The Rails assets:precompile task internally calls bin/rails tailwindcss:build, which uses hardcoded input/output file paths. Previously, the only way to customize these paths was to bypass the Rails integration entirely and use the Tailwind CLI directly (via bundle exec tailwindcss).

This change introduces TAILWINDCSS_INPUT_FILE and TAILWINDCSS_OUTPUT_FILE environment variables that allow users to override the default paths while still using the standard assets:precompile workflow.

This is useful for projects with non-standard asset structures or when integrating with custom build pipelines.

The Rails `assets:precompile` task internally calls `bin/rails tailwindcss:build`,
which uses hardcoded input/output file paths. Previously, the only way to
customize these paths was to bypass the Rails integration entirely and use
the Tailwind CLI directly (via `bundle exec tailwindcss`).

This change introduces TAILWINDCSS_INPUT_FILE and TAILWINDCSS_OUTPUT_FILE
environment variables that allow users to override the default paths while
still using the standard `assets:precompile` workflow.

This is useful for projects with non-standard asset structures or when
integrating with custom build pipelines.
@thewatts thewatts force-pushed the nw/input-output-env-vars branch from be95b05 to be03a48 Compare August 30, 2025 00:12
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