icejs2使用webpack, svg文件不支持source形式导入,全部变成了base64
- Dominant language
- TypeScript
- Stars
- 18.6k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Description
## What is the current behavior? 发生了什么?
icejs2 使用 webpack5,对静态资源默认使用了base64导入,对于svg文件使用source导入需要在module rules配置type,目前没有看到 webpackLoaders支持配置type的地方。


自定义svg icon组件,需要把svg source 通过 dangerouslySetInnerHTML 插入到 dom 里。
webpack5内置了asset/source能力,反而不需要使用 svgo-loader 和 raw-loader了
工作自定义插件修改是可行的:

## What is the expected behavior? 期望的结果是什么?
webpackLoaders支持配置type,或有提供plugins设置type类型
## Any additional comments? 相关环境信息?
- **ice.js Version**:2
- **build.json Configuration**:
- **Node Version**:
- **Platform**:
Contributor guide
Assessment
This issue has not been assessed yet.