Skip to content

Commit b5ab26d

Browse files
committed
feat(icons): Bundle icons locally to drop the Iconify API
Enable @nuxt/ui's client-side icon bundling (nuxt/ui#6635) so every icon — Nuxt UI's own component icons and the app's fa6/lucide icons — is embedded into the build instead of fetched from api.iconify.design at runtime. This restores offline icon rendering and removes the third-party runtime dependency. Verified against a production build: the icon SVG data is inlined and the running app makes zero requests to api.iconify.design. @nuxt/ui is temporarily pinned to the ephemeral pkg.pr.new preview of #6635, which is merged but not yet in a published release. Swap it back to a normal semver once the next @nuxt/ui release ships; the vite.config and @iconify-json/lucide changes stay identical. Assisted-by: ClaudeCode:claude-opus-4-8
1 parent a944b6a commit b5ab26d

3 files changed

Lines changed: 32 additions & 14 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"dependencies": {
3030
"@cesium/engine": "^26.0.0",
3131
"@cesium/widgets": "^16.0.0",
32-
"@nuxt/ui": "^4.9.0",
32+
"@nuxt/ui": "https://pkg.pr.new/@nuxt/ui@6635",
3333
"@tanstack/vue-virtual": "^3.13.31",
3434
"cesium": "^1.142.0",
3535
"cesium-sensor-volumes": "github:Flowm/cesium-sensor-volumes#1.140.0",
@@ -44,6 +44,7 @@
4444
"devDependencies": {
4545
"@iconify-json/fa6-brands": "^1.2.6",
4646
"@iconify-json/fa6-solid": "^1.2.4",
47+
"@iconify-json/lucide": "^1.2.116",
4748
"@types/node": "^26.1.0",
4849
"@vite-pwa/assets-generator": "^1.0.2",
4950
"@vitejs/plugin-vue": "^6.0.7",

pnpm-lock.yaml

Lines changed: 26 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vite.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ const config: ViteConfigWithTest = {
7474
vue(),
7575
// Neutral gray palette (default `slate` is blue-tinted and clashes with the
7676
// app's pure-dark toolbar surfaces).
77-
ui({ ui: { colors: { neutral: "neutral" } } }),
77+
ui({
78+
ui: { colors: { neutral: "neutral" } },
79+
icon: { clientBundle: { scan: true } },
80+
}),
7881
viteStaticCopy({
7982
targets: [
8083
// Copy Cesium Assets, Widgets, and Workers to a static directory

0 commit comments

Comments
 (0)