question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warnings when using auto importer

See original GitHub issue

Hopefully this is the right place. I’m having some issues getting the auto importer to work correctly and/or without warnings on sveltekit. I’ve made an example repository here: https://github.com/RickMeijer/sveltekit_auto-import

  • When visiting localhost:3000 you’ll see an error about a module not being found which makes sense, since I used the wrong syntax. Fixed now.
  • When visiting localhost:3000/foo you’ll see the same icon. A warning appears in the console (and during build), which might be or not be related to the problem. Preferably I won’t have a warning at all.

What am I overlooking? I think I’ve pieced the installation instructions together properly, so I’m not sure what’s going on.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
userquincommented, Mar 10, 2022

@SarcevicAntonio @ogrotten you can use preset-icons from unocss, you don’t need more sfc for your icons, the icons will go to your css

1reaction
userquincommented, Dec 31, 2021

@RickMeijer it shouldn’t work, but it works, the problem is the svelte/sveltekit internals: we have 2 plugin, unplugin-icons and vite-plugin-svelte, both with pre, then we have a few other vite internal plugins and finally the unplugin-auto-import plugin with post.

The warning comes from vite-plugin-svelte because the unplugin-auto-import is applied after it (the transformation) and so vite-plugin-svelte don’t see the import that unplugin-auto-import will add later.

I have added esm support to vite-unplugin-inspect (only on my local, the PR is ready to review on the repo), you can see the result here (you can see on the video the plugins and the order applied): https://imgur.com/dz2iLGb

I’m talking with svelte experts to figure out how we can remove the warning, but it would be hard or not possible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importation and Certification FAQs - NHTSA
The number alerts Customs to the fact that the vehicle can be lawfully imported (by an RI or by a person who has...
Read more >
Purpose of --enable-auto-import Warning - Stack Overflow
I expect a successful build to be completely silent. This message gives the false impression that there's something wrong with my code. I...
Read more >
Importing a Motor Vehicle | U.S. Customs and Border Protection
Warning Imported motor vehicles are subject to safety standards under the Motor Vehicle Safety Act of 1966, revised under the Imported ...
Read more >
Warnings : Illegally Imported Cars : State Titled Cars
Allows any individual (not just registered importers) to import non-conforming foreign motor vehicles if such import is for personal use and not ...
Read more >
Import Alerts - FDA
What is the purpose of an import alert? · Prevent potentially violative products from being distributed in the United States; · Free-up agency ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found