diff --git a/CHANGELOG.md b/CHANGELOG.md index e288aa2b6609..472341631f71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Use the right import base path when using the CLI to reading files from stdin ([#14522](https://github.com/tailwindlabs/tailwindcss/pull/14522)) - _Experimental_: Improve codemod output, keep CSS after last Tailwind directive unlayered ([#14512](https://github.com/tailwindlabs/tailwindcss/pull/14512)) - _Experimental_: Fix incorrect empty `layer()` at the end of `@import` at-rules when running codemods ([#14513](https://github.com/tailwindlabs/tailwindcss/pull/14513)) - _Experimental_: Migrate `@import "tailwindcss/tailwind.css"` to `@import "tailwindcss"` ([#14514](https://github.com/tailwindlabs/tailwindcss/pull/14514)) diff --git a/integrations/cli/index.test.ts b/integrations/cli/index.test.ts index 50842aea4ace..f1c4288d1912 100644 --- a/integrations/cli/index.test.ts +++ b/integrations/cli/index.test.ts @@ -182,4 +182,29 @@ describe.each([ ]) }, ) + + test( + 'production build (stdin)', + { + fs: { + 'package.json': json` + { + "dependencies": { + "tailwindcss": "workspace:^", + "@tailwindcss/cli": "workspace:^" + } + } + `, + 'index.html': html` +
+ `, + 'src/index.css': css`@import 'tailwindcss';`, + }, + }, + async ({ fs, exec }) => { + await exec(`${command} --input=- --output dist/out.css < src/index.css`) + + await fs.expectFileToContain('dist/out.css', [candidate`underline`]) + }, + ) }) diff --git a/packages/@tailwindcss-cli/src/commands/build/index.ts b/packages/@tailwindcss-cli/src/commands/build/index.ts index daf12294cf74..cf2fb90605f8 100644 --- a/packages/@tailwindcss-cli/src/commands/build/index.ts +++ b/packages/@tailwindcss-cli/src/commands/build/index.ts @@ -118,8 +118,10 @@ export async function handle(args: Result