vite-svg
vite-svg copied to clipboard
Can the plugin use default export?
Thank you for this plugin.
I find the usage for this plugin is a little verbose.
Can we simply do this
import SkipIcon from '/@assets/skip_next-24px.svg';
instead of
import {VueComponet as SkipIcon} from '/@assets/skip_next-24px.svg';
I see an equivalent react plugin here: https://developer.aliyun.com/mirror/npm/package/vite-plugin-svg-react
I just thought their usage is more concise.
Ah, I just learned your example project, I see why.
Yes, I wanted to keep the default behavior, but I could check whether making it an option would be something feasible.
I'm still fairly new to using ES module imports, is there a benefit I'm not aware of for having the export named rather than using default
(when there's only one class being exported). Or is retaining the VueComponent
name a concern of backward compatibility?