Bundle vscode-icons locally so file-tree icons stop hitting the API
This commit is contained in:
+7
-6
@@ -78,13 +78,14 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
// app.config.ts's codeIcon map resolves simple-icons/lucide names
|
// app.config.ts's codeIcon map resolves simple-icons/lucide names
|
||||||
// dynamically (not as a literal `i-xxx` string anywhere), so Nuxt
|
// dynamically (not as a literal `i-xxx` string anywhere), and
|
||||||
// Icon's static scanner can't pick them up for the local bundle.
|
// FileTreeNode.vue resolves vscode-icons file-type icons the same way,
|
||||||
// Without this, they fall back to a live api.iconify.design request
|
// so Nuxt Icon's static scanner can't pick any of them up for the local
|
||||||
// at prerender time, which times out wherever outbound access is
|
// bundle. Without this, they fall back to a live api.iconify.design
|
||||||
// restricted. Bundling both collections in full avoids that fallback.
|
// request at prerender time, which times out wherever outbound access
|
||||||
|
// is restricted. Bundling all three collections in full avoids that.
|
||||||
serverBundle: {
|
serverBundle: {
|
||||||
collections: ['simple-icons', 'lucide'],
|
collections: ['simple-icons', 'lucide', 'vscode-icons'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
content: {
|
content: {
|
||||||
|
|||||||
Reference in New Issue
Block a user