tailwindcss/integrations/postcss
Robin Malfait fe9fc9abba
Use resolveJsId when resolving tailwindcss/package.json (#15041)
This PR uses the `enhanced-resolve` instead of
`createRequire(…).resolve` which improves the usability when running the
upgrade tool locally using Bun.

While testing, we also noticed that it is not possible to use a
`cjs`-only plugin inside of an `esm` project. It was also not possible
to use an `esm`-only plugin inside of a `cjs` project.

# Test plan

We added integration tests in both the CLI (the CLI is an mjs project)
and in the PostCSS (where we can configure a `cjs` and `esm` PostCSS
config) integration tests where we created an `esm` and `cjs` based
project with 4 plugins (`cjs`-only, `esm`-only, and TypeScript based
plugins: `cts`-only and `mts`-only).
2024-11-19 18:39:49 +01:00
..
config.test.ts Support loading config files via @config (#14239) 2024-09-02 18:03:16 +02:00
core-as-postcss-plugin.test.ts Throw a useful error when tailwindcss is used as a PostCSS plugin (#14378) 2024-09-11 17:02:24 +02:00
index.test.ts Use resolveJsId when resolving tailwindcss/package.json (#15041) 2024-11-19 18:39:49 +01:00
multi-root.test.ts Add integration tests for multi-root builds (#14564) 2024-10-01 17:00:20 +02:00
next.test.ts Integration tests: Move all file writes into retry block (#14350) 2024-09-06 10:48:49 +02:00
plugins.test.ts Resolve third-party plugins with exports in their package.json (#14775) 2024-10-24 11:34:19 -04:00