zhangyuang / ssr

A most advanced ssr framework support React17/React18/Vue2/Vue3 on Earth that implemented serverless-side render specification.
http://doc.ssr-fc.com/
MIT License
2.61k stars 284 forks source link

使用element plus 组件库 图标字体经过webpack打包后加载不出来 #53

Closed EditYJ closed 3 years ago

EditYJ commented 3 years ago

现象: 63B9C13A-5A58-4759-B8C9-65C554549B05 Snipaste_2021-04-23_13-42-30 可复现例子: https://github.com/EditYJ/paixin-media-ssr

EditYJ commented 3 years ago

目前我的解决方案是修改webpack配置

config.module.rule('images').test(/\.(jpe?g|png|gif)(\?[a-z0-9=.]+)?$/)

去除images规则中对于字体文件的筛选,因为配置中已经对字体做了打包配置的处理。

具体可见此次提交: https://github.com/EditYJ/paixin-media-ssr/commit/3d52ca223c27b83447c2ffc80bbccd8f789f6763#diff-e8e9eea3276b2de9a74fd257902dc74c846f6fc8653bbddf45d738b71201f93d

zhangyuang commented 3 years ago

https://stackoverflow.com/questions/30442319/failed-to-decode-downloaded-font

貌似是字体规范的问题

zhangyuang commented 3 years ago

为了减少成本,这里框架统一修改,不处理字体文件。fix by version 5.5.17