You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently ran in to an issue where using Tailwind4's vite plugin my downstream ci/cd processes were failing. It turns out they were not able to process the built css file Tailwind4/Vite generated due to the licensing credit:
This is great! Its important to give Tailwind credit and follow licensing requirements, but for some applications this can have consequences. WordPress, for example, which has an ecosystem of plugins that expect the top of a compiled style.css in a theme to always follow the same format.
For example:
/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */
/*!
Theme Name: A WordPress Theme
Theme URI: https://github.com/my-wp-theme
Description: A modern Tailwind theme for WordPress
Version: 0.0.1
Tested up to: 6.7
Requires PHP: 8.1
This theme...
*/
This results in downstream processors that can not parse the version of the theme, breaking features like autoupdating.
Would it make sense to add a flag or option to move the Tailwind license credit to the bottom of a file or give those controlling CI/CD pipelines some agency over how the credit is made so that we can still credit Tailwind when NODE_ENV is set to production?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I recently ran in to an issue where using Tailwind4's vite plugin my downstream ci/cd processes were failing. It turns out they were not able to process the built css file Tailwind4/Vite generated due to the licensing credit:
tailwindcss/packages/tailwindcss/src/index.ts
Line 699 in aa817fb
This line
if (process.env.NODE_ENV !== 'test') {
ast.unshift(comment(
! tailwindcss v${version} | MIT License | https://tailwindcss.com
))}
adds
/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */
above final style.css compiled files.
This is great! Its important to give Tailwind credit and follow licensing requirements, but for some applications this can have consequences. WordPress, for example, which has an ecosystem of plugins that expect the top of a compiled style.css in a theme to always follow the same format.
For example:
This results in downstream processors that can not parse the version of the theme, breaking features like autoupdating.
Would it make sense to add a flag or option to move the Tailwind license credit to the bottom of a file or give those controlling CI/CD pipelines some agency over how the credit is made so that we can still credit Tailwind when NODE_ENV is set to production?
Beta Was this translation helpful? Give feedback.
All reactions