vbenjs / vite-plugin-svg-icons

Vite Plugin for fast creating SVG sprites.
MIT License
819 stars 111 forks source link

[symbolId] 当设置 symbolId 为 icon-[name] 时,最后得到的symbolId中仍含有文件夹名称 #56

Open canvascat opened 2 years ago

canvascat commented 2 years ago

比如icons文件结构如下:

icons
├── icon2.svg
└── dir
    └── icon1.svg

symbolId 为 icon-[name] 时,icon1最后得到的id为 icon-dir/icon1,期望得到 icon-icon1

https://github.com/vbenjs/vite-plugin-svg-icons/blob/7550357300793b96b3561fc708899b9f4309e906/packages/core/src/index.ts#L260-L270

nicolas-tesla-x commented 2 years ago

解决了吗?

canvascat commented 2 years ago

解决了吗?

@renzhao1113 还能怎么办,改改再发个包呗 https://github.com/canvascat/vite-svg-sprite