Repository navigation
[code-infra] Remove the explicit styled-components dependency - #23479
Merged
LukasTy merged 2 commits intoSep 2, 2026
Merged
Conversation
The docs never import `styled-components`. The package is an optional peer dependency of `@mui/internal-core-docs`. pnpm installs it through `auto-install-peers`, so the docs still resolve it from the `@mui/internal-core-docs` instance. This also makes the renovate bump in mui#23353 unnecessary. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploy previewBundle size
Check out the code infra dashboard for more information about this PR. |
styled-components dependencystyled-components dependency
1 task
…sed-dependency-a405fd
LukasTy
requested review from
Janpot and
brijeshb42
and
a lite review from Copilot
September 2, 2026 10:02
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Dependency cleanup is consistent with the lockfile state and there are no remaining docs imports requiring a direct styled-components dependency.
Pull request overview
Removes the redundant explicit styled-components dependency from the docs app, relying on pnpm’s optional peer installation via @mui/internal-core-docs as intended.
Changes:
- Removed
styled-componentsfromdocs/package.jsondependencies. - Updated
pnpm-lock.yamlto reflect the removal from the docs importer while keepingstyled-componentspresent as an optional package entry.
File summaries
| File | Description |
|---|---|
docs/package.json |
Drops the explicit styled-components dependency from the docs app. |
pnpm-lock.yaml |
Removes styled-components from the docs importer and marks the lock snapshot entry as optional. |
Review details
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
- Files reviewed: 1/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
brijeshb42
approved these changes
Sep 2, 2026
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.
The docs do not import
styled-componentsanywhere. The package is an optional peer dependency of@mui/internal-core-docs, which uses it inutils/rtlBundle.js(re-exportsStyleSheetManager) and inDocument/getInitialProps.js(behindsetupStyledComponents, which mui-x sets tofalse).pnpm has
auto-install-peersenabled, so it installs the optional peer and links it into the@mui/internal-core-docsinstance. The explicit entry indocs/package.jsonis redundant.This also makes #23353 unnecessary.
Verification
After the removal,
pnpm install+pnpm dedupekeepstyled-componentsinstalled as an optional peer of@mui/internal-core-docs:pnpm peers checkreports nostyled-componentsissue.pnpm dedupeproduces no extra changes.pnpm --filter docs typescriptpasses.🤖 Generated with Claude Code