Skip to content

Commit

Permalink
Add *.js export variants for compat files (#14595)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
philipp-spiess authored Oct 4, 2024
1 parent bc18a57 commit c01b825
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions packages/tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit c01b825

Please sign in to comment.