Jevon617 / unplugin-svg-component

generate a vue/react component through svg files, supporting svg file HMR, Tree-shaking, SSR and TS hint.
MIT License
58 stars 5 forks source link

为啥打包 svg 文件到 index.html,可否支持打包到入口 js 中? #17

Closed zhuanglong closed 5 months ago

zhuanglong commented 7 months ago

由于不缓存 index.html,导致加载 index.html 有点慢。

Jevon617 commented 7 months ago

确实是一个可以优化的点, 当初选择最简单的方式实现, 并没有考虑缓存这块. 但我最近有点忙, 后续有时间会增加一个配置, 如果可以的话, 欢迎PR.

Jevon617 commented 5 months ago

@zhuanglong 在 v0.10.0 中设置 domInsertionStrategy 为 dynamic 将通过 js 动态加载 svg.