Skip to content

Commit 18cb3c6

Browse files
Upgrade: Allow corePlugins in JS config files (#14742)
This PR enables JS configuration files with `corePlugins` themes to be migrated. If such option is found in your config, we will warn the user and omit the option from the resulting CSS file as there is no v4 alternative. --------- Co-authored-by: Adam Wathan <[email protected]>
1 parent 1c5bb39 commit 18cb3c6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- _Upgrade (experimental)_: Migrate `plugins` with options to CSS ([#14700](https://github.com/tailwindlabs/tailwindcss/pull/14700))
13+
- _Upgrade (experimental)_: Allow JS configuration files with `corePlugins` options to be migrated to CSS ([#14742](https://github.com/tailwindlabs/tailwindcss/pull/14742))
1314

1415
### Fixed
1516

packages/@tailwindcss-upgrade/src/migrate-js-config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ export async function migrateJsConfig(
6363
if (themeConfig) cssConfigs.push(themeConfig)
6464
}
6565

66+
if ('corePlugins' in unresolvedConfig) {
67+
info(
68+
`The \`corePlugins\` option is no longer supported as of Tailwind CSS v4.0, so it's been removed from your configuration.`,
69+
)
70+
}
71+
6672
let simplePlugins = findStaticPlugins(source)
6773
if (simplePlugins !== null) {
6874
for (let [path, options] of simplePlugins) {
@@ -214,6 +220,7 @@ function canMigrateConfig(unresolvedConfig: Config, source: string): boolean {
214220
'plugins',
215221
'presets',
216222
'prefix', // Prefix is handled in the dedicated prefix migrator
223+
'corePlugins',
217224
]
218225

219226
if (Object.keys(unresolvedConfig).some((key) => !knownProperties.includes(key))) {

0 commit comments

Comments
 (0)