Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs-infra] Fix @mui/material version used in sandboxes #13260

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ ponyfillGlobal.muiDocConfig = {
csbIncludePeerDependencies: (deps, { versions }) => {
const newDeps = { ...deps };

newDeps['@mui/material'] = versions['@mui/material'];
// #default-branch-switch
// Check which version of `@mui/material` should be resolved when opening docs examples in StackBlitz or CodeSandbox
newDeps['@mui/material'] =
versions['@mui/material'] !== 'next' ? versions['@mui/material'] : 'latest';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone with a solution, which still allows monorepo to provide a specific @mui/material version, but if you think that we should just go for simplicity—we can do that. 👌

-versions['@mui/material'] !== 'next' ? versions['@mui/material'] : 'latest';
+'latest';


if (newDeps['@mui/x-data-grid-generator']) {
newDeps['@mui/icons-material'] = versions['@mui/icons-material'];
Expand Down
Loading