Closed joanoor closed 1 year ago
新版本的unplugin-svg-component,开发环境可以正常使用,但是打包部署到生产环境,图标就不显示。回退到版本0.4.1则没有这个问题。
v0.5.0加了tree-shaking, 这可能会影响生产的代码,可以看下配置项的scanStrategy看是否能解决你的问题, 如果不能解决, 可以提供一个最小的复现demo。
scanStrategy
scanStrategy: 'text' 能解决
@rxxcy Thank you!
新版本的unplugin-svg-component,开发环境可以正常使用,但是打包部署到生产环境,图标就不显示。回退到版本0.4.1则没有这个问题。