Replace the hashing asset plugin with two build-time plugins that never
rename their files, so an unchanged font or sprite stays in every
visitor's cache across deploys (0011, 0012):
- icon-sprite-plugin builds icons/*.svg with svgo into
public/icons/symbol-defs.svg. The Icon atom links it as
symbol-defs.svg?v=<ICON_SPRITE_VERSION>; the file's first line stamps
its version, so dev warns when the sprite changes without a bump.
- font-copy-plugin copies island fonts/ byte for byte into public/fonts/
and warns when a font changes under its old name.
- island fonts.css declares both Yekan Bakh faces with root paths and a
fallback face; theme.css points font-sans and font-latin at them.
- Root layouts preload CRITICAL_FONT_URL. next/font is gone.
- Both apps serve /fonts and /icons as immutable.
- island env, the apps' island-env bootstrap, NEXT_PUBLIC_ISLAND_* and
NEXT_PUBLIC_CDN_ORIGIN are removed; paths live in island constants.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add withIslandAssets (island tools/asset-plugin) per ADR 0008. On next dev
and next build it builds the svgo sprite from src/icons and copies the
Yekan Bakh fonts into the app's public/ under content-hashed names, puts
their paths in env (NEXT_PUBLIC_ISLAND_*) and serves them with an
immutable Cache-Control. Files are written in headers(), which only Next
calls, because Nx's next plugin also evaluates the config from the
workspace root.
- island env (setEnv/getEnv); Icon reads the sprite path from it
- icon-sprite-plugin becomes icon-name-extraction (IconName type only);
the committed sprite.svg is removed
- bull and bear register the plugin, validate the paths, pass them to
island through their bootstraps, and add an optional CDN origin for fonts
- gitignore the generated files; Nx build outputs include them
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>