Add *.js export variants for compat files (#14595)

In v3 it was possible to import `*.js` variants of compat files, e.g.
`tailwindcss/plugin.js` in addition to `tailwindcss/plugin`. We need to
properly map the exports to support this.
This commit is contained in:
Philipp Spiess 2024-10-04 15:38:55 +02:00 • committed by GitHub
parent bc18a57113
commit c01b8254e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 0 deletions

View file

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Add support for `tailwindcss/colors.js`, `tailwindcss/defaultTheme.js`, and `tailwindcss/plugin.js` exports ([#14595](https://github.com/tailwindlabs/tailwindcss/pull/14595))
- Support `keyframes` in JS config file themes ([14594](https://github.com/tailwindlabs/tailwindcss/pull/14594))
### Fixed

View file

@ -27,14 +27,26 @@
"require": "./src/compat/colors.cts",
"import": "./src/compat/colors.ts"
},
"./colors.js": {
"require": "./src/compat/colors.cts",
"import": "./src/compat/colors.ts"
},
"./defaultTheme": {
"require": "./src/compat/default-theme.cts",
"import": "./src/compat/default-theme.ts"
},
"./defaultTheme.js": {
"require": "./src/compat/default-theme.cts",
"import": "./src/compat/default-theme.ts"
},
"./plugin": {
"require": "./src/plugin.cts",
"import": "./src/plugin.ts"
},
"./plugin.js": {
"require": "./src/plugin.cts",
"import": "./src/plugin.ts"
},
"./package.json": "./package.json",
"./index.css": "./index.css",
"./index": "./index.css",
@ -59,14 +71,26 @@
"require": "./dist/plugin.js",
"import": "./dist/plugin.mjs"
},
"./plugin.js": {
"require": "./dist/plugin.js",
"import": "./dist/plugin.mjs"
},
"./defaultTheme": {
"require": "./dist/default-theme.js",
"import": "./dist/default-theme.mjs"
},
"./defaultTheme.js": {
"require": "./dist/default-theme.js",
"import": "./dist/default-theme.mjs"
},
"./colors": {
"require": "./dist/colors.js",
"import": "./dist/colors.mjs"
},
"./colors.js": {
"require": "./dist/colors.js",
"import": "./dist/colors.mjs"
},
"./package.json": "./package.json",
"./index.css": "./index.css",
"./index": "./index.css",