tailwindcss/packages/@tailwindcss-node/src
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
..
compile.ts Rewrite urls in CSS files when using Vite (#14877) 2024-11-07 09:51:58 -05:00
env.ts Expose timing information in debug mode (#14553) 2024-09-30 14:39:21 +00:00
esm-cache.loader.mts Support loading config files via @config (#14239) 2024-09-02 18:03:16 +02:00
get-module-dependencies.ts Support loading config files via @config (#14239) 2024-09-02 18:03:16 +02:00
index.cts Expose timing information in debug mode (#14553) 2024-09-30 14:39:21 +00:00
index.ts Template migrations: Migrate v3 prefixes to v4 (#14557) 2024-10-01 18:04:08 +02:00
normalize-path.ts Resolve @import in core (#14446) 2024-09-23 17:05:55 +02:00
require-cache.cts Support loading config files via @config (#14239) 2024-09-02 18:03:16 +02:00
urls.test.ts Rewrite urls in CSS files when using Vite (#14877) 2024-11-07 09:51:58 -05:00
urls.ts Rewrite urls in CSS files when using Vite (#14877) 2024-11-07 09:51:58 -05:00