Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change server proxy preset for @nuxt/icon #836

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sawden
Copy link

@sawden sawden commented Jan 4, 2025

🔗 Linked issue

Resolves #780

📚 Description

Reproduced #780 using latest @nuxtjs/storybook v8.3.3 and can confirm that icons couldn’t be loaded in Storybook because the api/_nuxt_icon endpoint (from @nuxt/icon) isn’t accessible on port 6006.

So I checked all currently proxied routes and noticed that there is a _icon route, but it isn’t used by @nuxt/icon or any other official Nuxt module, community module, or icon module listed here. There’s also no Git history explaining why _icon was added. Therefore, I replaced it with the actual api/_nuxt_icon endpoint from @nuxt/icon

Route Module Code Reference
_nuxt core (buildassetsdir) Docs
_ipx @nuxt/image GitHub
__nuxt_devtools__ @nuxt/devtools-kit GitHub
__nuxt_island core (<NuxtIsland>) GitHub
api/_nuxt_icon @nuxt/icon GitHub
_icon ? ?

This change fixes icon loading with @nuxt/icon in Storybook.

Before:

default includeCustomCollections enabled
before-sb before-sb-client-bundle

After:

default includeCustomCollections enabled
after-sb after-sb

Copy link

netlify bot commented Jan 4, 2025

👷 Deploy request for nuxt-storybook pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit fc7dc89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@nuxt/icon does not work
1 participant