Skip to content

[docs-infra] Import font module for nextjs transpilation#47935

Merged
brijeshb42 merged 1 commit intomui:masterfrom
brijeshb42:fix-generate-font-classes
Mar 10, 2026
Merged

[docs-infra] Import font module for nextjs transpilation#47935
brijeshb42 merged 1 commit intomui:masterfrom
brijeshb42:fix-generate-font-classes

Conversation

@brijeshb42
Copy link
Contributor

Fix font class generation with next.js. It has to be imported in _app to be generated.

Bug:
Screenshot 2026-03-09 at 11 59 05 PM

After fix:
Screenshot 2026-03-09 at 11 59 17 PM

@brijeshb42 brijeshb42 requested review from a team and Janpot March 9, 2026 18:31
@brijeshb42 brijeshb42 added type: bug It doesn't behave as expected. scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). labels Mar 9, 2026
@mui-bot
Copy link

mui-bot commented Mar 9, 2026

Netlify deploy preview

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

Bundle size report

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 651a8b6

@brijeshb42 brijeshb42 enabled auto-merge (squash) March 10, 2026 05:56
@brijeshb42 brijeshb42 merged commit 4c3ceb4 into mui:master Mar 10, 2026
19 of 20 checks passed
import '../public/static/components-gallery/base-theme.css';
import './global.css';

export { fontClasses } from '@mui/docs/nextFonts';
Copy link
Member

Choose a reason for hiding this comment

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

I wonder why it did not throw in docs build earlier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The font css were not generated by nextjs, only the classnames were which is not a build error.

@brijeshb42 brijeshb42 deleted the fix-generate-font-classes branch March 10, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants