tailwindcss/packages
Jordan Pittman e82b316c61
Rewrite urls in CSS files when using Vite (#14877)
Fixes #14784

This is an alternative to #14850 in which we actually perform url
rewriting / rebasing ourselves. We ported a large portion of the
URL-rewriting code from Vite (with attribution) to use here with some
minor modifications. We've added test cases for the url rewriting so
verifying individual cases is easy. We also wrote integration tests for
Vite that use PostCSS and Lightning CSS that verify that files are found
and inlined or relocated/renamed as necessary.

We also did some manual testing in the Playground to verify that this
works as expected across several CSS files and directories which you can
see a screenshot from here:

<img width="1344" alt="Screenshot 2024-11-05 at 10 25 16"
src="https://github.com/user-attachments/assets/ff0b3ac8-cdc9-4e26-af79-36396a5b77b9">

---------

Co-authored-by: Philipp Spiess <hello@philippspiess.com>
2024-11-07 09:51:58 -05:00
..
@tailwindcss-cli Optimize generated CSS output (#14873) 2024-11-06 11:39:09 +00:00
@tailwindcss-node Rewrite urls in CSS files when using Vite (#14877) 2024-11-07 09:51:58 -05:00
@tailwindcss-postcss Rename --width-* namespace to --container-* (#14898) 2024-11-06 20:50:30 -05:00
@tailwindcss-standalone Prepare v4.0.0-alpha.31 release (#14823) 2024-10-30 07:53:51 -04:00
@tailwindcss-upgrade Fix crash during upgrade when content globs escape root of project (#14896) 2024-11-07 12:22:25 +00:00
@tailwindcss-vite Rewrite urls in CSS files when using Vite (#14877) 2024-11-07 09:51:58 -05:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Rewrite urls in CSS files when using Vite (#14877) 2024-11-07 09:51:58 -05:00
tsconfig.base.json introduce v4 codebase 2024-03-05 14:29:15 +01:00