Problem
dist/index.css compiles @tedi-design-system/core/index, which declares all three Material Symbols icon fonts (outlined, rounded, sharp, ~350–430 KB each). The package exports only ./index.css, so an app that uses a single icon type cannot avoid the other two. Browsers only download an @font-face font once a glyph uses it, but PWA service workers precache every font in the build output (~1 MB).
Originally reported in TEDI-Design-System/react#41. Core added opt-in per-style entries in @tedi-design-system/core 6.10.0 (TEDI-Design-System/core#146), and React has adopted them. Angular needs the same change.
Solution
Mirror the React implementation while keeping index.css backward compatible:
Consumer usage after the change:
// angular.json styles, or a global import
'@tedi-design-system/angular/index-without-icons.css'
'@tedi-design-system/angular/icons/outlined.css' // or rounded.css / sharp.css
For PWAs, the docs should say to exclude the unused fonts from the precache: Workbox globIgnores: ['**/material-symbols-{rounded,sharp}.woff2'], or narrower assetGroups file patterns in ngsw-config.json for the Angular service worker.
Examples and information
Project
DoD
Problem
dist/index.csscompiles@tedi-design-system/core/index, which declares all three Material Symbols icon fonts (outlined, rounded, sharp, ~350–430 KB each). The package exports only./index.css, so an app that uses a single icon type cannot avoid the other two. Browsers only download an@font-facefont once a glyph uses it, but PWA service workers precache every font in the build output (~1 MB).Originally reported in TEDI-Design-System/react#41. Core added opt-in per-style entries in
@tedi-design-system/core6.10.0 (TEDI-Design-System/core#146), and React has adopted them. Angular needs the same change.Solution
Mirror the React implementation while keeping
index.cssbackward compatible:@tedi-design-system/coreto^6.11.2src/styles/index-without-icons.scss(@use '@tedi-design-system/core/index-without-icons'+vertical-spacing+cdk);index.scssforwards it plus@tedi-design-system/core/icons/all, soindex.cssoutput stays the samebuildscript: compile both entries (dist/index.css,dist/index-without-icons.css), run the/fonts/→./fonts/rewrite on both, copy core'sicons/*.csstodist/icons/(they reference../fonts/, which already resolves todist/fonts/)package.jsonexports: add./index-without-icons.cssand./icons/*.csstypeinput): recommend using a single icon type, show the single-style import, add the PWA precache noteConsumer usage after the change:
For PWAs, the docs should say to exclude the unused fonts from the precache: Workbox
globIgnores: ['**/material-symbols-{rounded,sharp}.woff2'], or narrowerassetGroupsfile patterns inngsw-config.jsonfor the Angular service worker.Examples and information
index-without-icons.{scss,css},icons/{outlined,rounded,sharp,all}.{scss,css}Project
DoD
index.cssoutput unchanged for existing consumers (all three icon styles still declared)index-without-icons.cssdeclares no Material Symbols@font-faceicons/<style>.cssreferences exactly one woff2 that resolves in the published packagetype(scope): Subject text #issue-refis used (forsemantic-release), with the issue reference required - see Commit convention