feat: add css-plugins-to-native-css codemod - #7
Merged
Conversation
…ve, guarded plugins)
…them with a comment
🦋 Changeset detectedLatest commit: 3234308 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
avivkeller
reviewed
Aug 2, 2026
avivkeller
reviewed
Aug 2, 2026
avivkeller
reviewed
Aug 2, 2026
avivkeller
reviewed
Aug 2, 2026
avivkeller
reviewed
Aug 2, 2026
avivkeller
reviewed
Aug 2, 2026
…s, merged planners)
Member
Author
|
Okay, all that's left is the hooks part. |
…ve parser/generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the first codemod,
@webpack/css-plugins-to-native-css, which migrates configurations frommini-css-extract-pluginandstyle-loader/css-loaderrules to webpack's native CSS support, relying on theexperiments.css: "auto"default from webpack >= 5.109.0. It also extracts the reusable ast-grep helpers into a shared@webpack/codemod-utilsworkspace for future codemods.What kind of change does this PR introduce?
feat
Did you add tests for your changes?
Yes — 18 input/expected fixture pairs under
codemods/css-plugins-to-native-css/tests/, covering ejected CRA configs, dev/prod guards,oneOfnesting,webpack-merge/function-form configs, CSS Modules, and non-migratable loader options.Does this PR introduce a breaking change?
No.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
Documented in the codemod's
README.md, the rootREADME.mdtable, andAGENTS.md/CONTRIBUTING.md(shared utilities workspace).Use of AI
This PR was developed with Claude Code under my direction: I specified the migration semantics and reviewed each iteration; the AI wrote the transform, fixtures, and docs. Behavior was validated against real webpack 5.109 builds (including a real sass-loader chain).