Why does UButton icon 404 error unless icon is separately pre-loaded?
Relevant chunk of code:
By itself I get the error: "Failed to load resource: the server responded with a status of 404 ()"
However it works if after the above I add:
Is there a less hacky way to preload icons? I tried
loadIcons()
but that didn't work.
Thanks!!5 Replies
build or generate? π
Thanks for the response @Orbis sorry I missed it before! This is happening when I use
build
- using the default nuxt GitHub action to deploy with npx nuxt build --preset github_pages
(super new to Nuxt so sorry if I misunderstood the question)So its generate. I think this part will be rendered at build time. Try 2 buttons with v-show instead.
What do you mean "its generate" ? Is
nuxt build --preset
the same as generate
?
And will try it thanks
Didn't fix it unfortunately π¦Mhhh. Do you have a minimal reproduction?