You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a button component that allows you to specify what icon it should use. Before now, I used the svelte-feather package to do a quick and dirty dynamic icon like this:
Obviously there are more options and more code than this, but it shows the way I've been doing this. It works, it's simple, and it's even performant enough for my needs, since it will almost exclusively be used in static elements, but I have yet to figure out a way to do this with unplugin.
PS: How do I get the typescript lsp to stop yelling at me about this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there any way to do dynamic imports?
I have a button component that allows you to specify what icon it should use. Before now, I used the
svelte-feather
package to do a quick and dirty dynamic icon like this:Obviously there are more options and more code than this, but it shows the way I've been doing this. It works, it's simple, and it's even performant enough for my needs, since it will almost exclusively be used in static elements, but I have yet to figure out a way to do this with unplugin.
PS: How do I get the typescript lsp to stop yelling at me about this?
Beta Was this translation helpful? Give feedback.
All reactions