Skip to content

Conversation

naaa760
Copy link

@naaa760 naaa760 commented Sep 12, 2025

fixes: #83674

What?

Fixed font loading issue when experimental.inlineCss is enabled. Fonts were not loading properly in production builds because font CSS files containing @font-face declarations were not being included in the CSS inlining process.

Why?

When experimental.inlineCss is enabled, CSS files are inlined as <style> tags instead of being loaded as separate files. However, the CSS filtering logic in ClientReferenceManifestPlugin was not properly including font CSS files, causing fonts to fail to load in production builds.

How?

  • Enhanced the CSS filtering logic in ClientReferenceManifestPlugin to:
  1. Improved the filter condition to ensure all CSS files (including font CSS) are properly included
  2. Enhanced CSS content handling to properly convert source to string format for inlining
  3. Ensured @font-face declarations are preserved when CSS is inlined

@ijjk
Copy link
Member

ijjk commented Sep 12, 2025

Allow CI Workflow Run

  • approve CI run for commit: aeeb633

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loading fonts breaks when experimental.inlineCss is set to true
2 participants