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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug?]: unplugin-icons + unplugin-auto-import don't work within filesystem routes #1374

Open
2 tasks done
Brendonovich opened this issue Mar 9, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working vinxi related to vinxi

Comments

@Brendonovich
Copy link
Contributor

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

Inside files in /routes that have a default export - ie those that export a route component - the imports that would usually be provided by unplugin-auto-import are (i assume) not present, so instead of rendering the icons there is an attempt to render undefined.
In files that don't export a default component this is apparently not an issue.

Expected behavior 馃

The imports from unplugin-auto-import should always be present so that auto-imports can be used in route files.

Steps to reproduce 馃暪

Steps:

  1. Go to this StackBlitz
  2. Notice that using the icon works in /app.tsx and /routes/SeparateFileComponent.tsx, but not /routes/index.tsx

Context 馃敠

I want to have auto imported icons throughout my whole app.

Your environment 馃寧

No response

@Brendonovich Brendonovich added the bug Something isn't working label Mar 9, 2024
@nksaraf
Copy link
Member

nksaraf commented Mar 10, 2024

Probably a vinxi (bundler issue)

@nksaraf nksaraf added the vinxi related to vinxi label Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vinxi related to vinxi
Projects
None yet
Development

No branches or pull requests

2 participants