Closed drgarlic closed 3 years ago
Hi Kevin, please don't open issues without providing the requested information, as it doesn't allow me to investigate why this might be happening.
Client scripts are completely detached from the component lifecycle, they are meant to run code in the browser and provide a convenient way to attach themselves to the prerendered HTML. You seem to be importing components on a client script, but that on its own wouldn't render them, and it wouldn't make them available in the template (use a standard or setup sfc script for that).
Keeping this open as a reminder to fail if aclient:
script uses setup
.
Unrelated, vite-svg-loader
should not be necessary, you can place custom svgs in /icons and use them (IconAppLogo
), or define a custom collection in unplugin-icons (passing config to the @islands/icons
module).
iles
andvite
.Description π
Basically the title. On build with vite-svg-loader it'll break and won't build but when importing icons only the build will finish but the icons won't show up. In dev mode there is no error but neither the sag imported nor the icons will show up.
Reproduction π
Please provide a link to a repo that can reproduce the problem you ran into.
I'll try to do this ASAP
In the meantime here's the config file
Dependencies Info
_Run `npx iles info` and `pnpm list` (or `npm list`) and provide the output:_ ``` ```Logs π
If not providing a reproduction:
Output
_Run `DEBUG=iles:* npm run dev` or `DEBUG=iles:* npm run build` and provide the output:_ ``` ```Screenshots π·
Provide console or browser screenshots of the problem.
Screenshots of the build mode:
With an svg:
With icons only: