test(font-subsetting): e2e atomic-loader + subsetting for headless fonts#1123
Merged
Hotell merged 3 commits intoJul 2, 2026
Merged
Conversation
📋 PR Validation SummaryCheck the Build react library job summary for detailed reports:
|
…ting (headless)
Add an end-to-end webpack entry proving the full headless font pipeline:
barrel `@fluentui/react-icons` import -> atomic loader ({ headless: true,
iconVariant: 'fonts' }) rewrites to headless font atoms -> this plugin
subsets the shared font. Also asserts the module graph stays Griffel-free.
README: note pairing the subsetting plugin with the atomic loader so
consumers don't need to hand-write headless atomic imports.
(References the atomic loader's built lib via relative path; no package
devDependency added — monorepo single-version policy.)
Hotell
force-pushed
the
react-icons/headless-e2e-loader-subsetting
branch
from
July 2, 2026 08:26
0fdbb8f to
daa0944
Compare
Hotell
force-pushed
the
react-icons/headless-e2e-loader-subsetting
branch
from
July 2, 2026 08:54
cde5ed5 to
6e368fc
Compare
Hotell
marked this pull request as ready for review
July 2, 2026 09:04
dmytrokirpa
approved these changes
Jul 2, 2026
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.
Summary
End-to-end integration proving the full headless font pipeline works when the atomic loader and the font-subsetting plugin are combined.
What it verifies
A new webpack test entry (
e2eBarrelHeadlessFonts) in the font-subsetting plugin:import { … } from '@fluentui/react-icons'.{ headless: true, iconVariant: 'fonts' }) rewrites it into headless font atoms (@fluentui/react-icons/headless/fonts/*).@griffel/*module in the graph).The existing
headlessAtomsentry now also carries the Griffel-free assertion, giving both headless-fonts entries the same guarantee.Changes
test/src/e2e-barrel-headless-fonts.js— the barrel fixture (+ the requiredheadless/fonts/styles.cssimport).test/webpack.config.js— newe2eBarrelHeadlessFontsentry (scoped atomic-loader rule referencing the loader's builtlibvia relative path) and a sharedassertNoGriffelpath. Entries that assert Griffel-freedom disable module concatenation (concatenateModules: false) so the verify hook can inspect individual moduleresources — otherwise scope hoisting would merge modules into aConcatenatedModuleand hide a leaked@griffelmodule.project.json— the plugin'stesttarget nowdependsOnthe atomic loader'sbuild. Because the test references the loader through a raw filesystem path (not a package import), Nx's project-graph inference can't detect the dependency; without this, CI (nx affected -t test) wouldn't build the loader'slib/when only this package is affected, causing aModule not foundfailure.README.md— tip on pairing the subsetting plugin with the atomic loader so consumers don't hand-write headless atomic imports.Notes
devDependenciesadded (monorepo single-version policy); the loader is referenced via its builtlibpath, mirroring how the loader's own tests reference../lib.lib/is gitignored (source/test-only commit).