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 TypeScrit error in demo export #37830

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Jul 5, 2023

When you export any of the demos with TypeScript to CodeSandbox, StackBlitz, you will get:

Screenshot 2023-07-05 at 15 33 05

which breaks yarn build.

I have found thing working on https://www.notion.so/mui-org/Monthly-meeting-2023-07-04-de26e366aa4148c6ae9cb7bdd55165c0?pvs=4#ac80a962246842dfa60a96cf98078a75, frustrating, I wanted to build the app in production mode.

Preview: https://deploy-preview-37830--material-ui.netlify.app/material-ui/react-alert/#basic-alerts

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work typescript scope: docs-infra Specific to the docs-infra product labels Jul 5, 2023
@oliviertassinari oliviertassinari force-pushed the codesandbox-fix-typescript branch from 7704228 to 97b46b9 Compare July 5, 2023 13:34
@mui-bot
Copy link

mui-bot commented Jul 5, 2023

Netlify deploy preview

https://deploy-preview-37830--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against c672d40

Comment on lines +51 to +52
// document.querySelector returns 'Element | null' but createRoot expects 'Element | DocumentFragment'.
const type = demoData.codeVariant === 'TS' ? '!' : '';
Copy link
Member Author

@oliviertassinari oliviertassinari Jul 5, 2023

Choose a reason for hiding this comment

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

Copy link
Member

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

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

👍

@oliviertassinari oliviertassinari merged commit d2e0f7c into mui:master Jul 12, 2023
@oliviertassinari oliviertassinari deleted the codesandbox-fix-typescript branch July 12, 2023 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work scope: docs-infra Specific to the docs-infra product typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants