Fix font loading dependencies - #289
Open
zoharma wants to merge 3 commits into
Open
Conversation
* Move `@mui/icons-material` and `react-icons` to `peerDependencies`, while keeping them in `devDependencies` so local builds and Storybook still work. * Remove `includeDependencies: true` from `rollup-plugin-peer-deps-external` so regular dependencies, including `@fontsource-*`, are bundled into `dist`.
- Extract fonts to a real dist/style.css instead of injecting via JS - Add a "./style.css" export for consumers to import - update to `pnpm-lock.yaml` single-quote based on new pnpm 11 conventions
also calling latin font directly for mono
zoharma
force-pushed
the
zma/ds-dependency-update
branch
from
September 9, 2026 15:46
9c08e5d to
bf6d9c2
Compare
zoharma
marked this pull request as ready for review
September 9, 2026 16:14
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.
Fonts are now bundled directly into
distinstead of being left for consuming apps to load.This fixes the following:
ERR_UNKNOWN_FILE_EXTENSIONwhen Node tried to load the font CSS directlyincludeDependencies: truefrom the Rollup config, so font packages are included in the build instead of treated as external dependencies.@mui/icons-materialandreact-iconsare still kept external, so they are now listed aspeerDependencies.Verified on the new dev app branch.
Notes:
pnpm add @mui/icons-material react-iconsimport "@diamondlightsource/sci-react-ui/font-styles.css"