Joaquín Sánchez

Results 1398 comments of Joaquín Sánchez

```ts declare module 'virtual:icons/*' { import { Component } from 'svelte' import type { SvelteHTMLElements } from 'svelte/elements' type Type = { [P in keyof K]: K[P] } const component:...

Remove the type, just split the component + default export: ```ts declare module 'virtual:icons/*' { import { Component } from 'svelte' import type { SvelteHTMLElements } from 'svelte/elements' const component:...

> Cool - you totally beat me to it - this is what I was experimenting with. I hadn't got the `keyof` bit quite working yet > > ```ts >...

Change svelte5.d.ts: next time we should check any d.ts at root ;)

> Neither of your solutions give me completions in nvim but if they're working in VSCode them I'm happy to put it down to a client issue Did you restarted...

You shouldn't register the vue plugin, VP will do it for you: https://stackblitz.com/~/edit/vite-sy7hbac3?file=docs/.vitepress/config.ts:L36-L42 ```ts vue: { template: { compilerOptions: { isCustomElement: templateCompilerOptions.template.compilerOptions.isCustomElement }, }, }, ```

upps: https://stackblitz.com/edit/vite-sy7hbac3?file=docs%2F.vitepress%2Fconfig.ts

Use this to register your global components (you can also use unplugin-vue-components in your vite.config.ts file): https://vitepress.dev/guide/extending-default-theme#registering-global-components

Use the code in the VP docs, you're breaking components registration, use extends instead manual invocation: https://vitepress.dev/guide/extending-default-theme#registering-global-components

If using SSR app, you will need to prerender index.vue page (that's the fallback page /). Check https://github.com/vite-pwa/sveltekit/issues/65#issuecomment-1734213190 .