tailwindcss/packages
Philipp Spiess 7347a2fd1c
Vite: Use Vite resolvers for CSS and JS files (#15173)
Closes #15159

This PR extends the `@tailwindcss/node` packages to be able to overwrite
the CSS and JS resolvers. This is necessary as some bundlers, in
particular Vite, have a custom module resolution system that can be
individually configured. E.g. in Vite it is possible to add custom
[resolver
configs](https://vite.dev/config/shared-options.html#resolve-conditions)
that is expected to be taken into account.

With the new `customCssResolver` and `customJsResolver` option, we're
able to use the Vite resolvers which take these configs into account.

## Test Plan

Tested in the playground by configuring [resolver
conditions](https://vite.dev/config/shared-options.html#resolve-conditions)
(with Vite 5.4 and Vite 6 beta). An integration test was added for both
the JS and CSS resolvers to ensure it keeps working as expected.

---------

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2024-11-27 11:48:55 -05:00
..
@tailwindcss-cli Set browser targets for iOS Safari, Firefox, and Chrome (#15166) 2024-11-26 11:22:12 +00:00
@tailwindcss-node Vite: Use Vite resolvers for CSS and JS files (#15173) 2024-11-27 11:48:55 -05:00
@tailwindcss-postcss Use unitless line-heights for font-size variables (#15216) 2024-11-27 11:39:04 -05:00
@tailwindcss-standalone Prepare v4.0.0-beta.2 release (#15104) 2024-11-22 11:17:21 -05:00
@tailwindcss-upgrade Upgrade: Migrate prefixed group and peer classes (#15208) 2024-11-27 11:34:27 -05:00
@tailwindcss-vite Vite: Use Vite resolvers for CSS and JS files (#15173) 2024-11-27 11:48:55 -05:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Don't register properties with types unless necessary (#15215) 2024-11-27 11:47:27 -05:00
tsconfig.base.json introduce v4 codebase 2024-03-05 14:29:15 +01:00