New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dva+antd项目,使用本地icon-url 打包后没有字体文件, #576
Comments
打包后的css文件 地址还是与开发环境一样
|
线上页面路径和本地开发环境的页面路径分别是啥? |
打包后的文件路径是 |
我是问页面路径并非静态文件路径。 |
你说的页面路径是指下面这种吗?不好意思,有点不明白 |
检查下线上的字体文件是否可访问:http://xxx.com/src/assets/iconfont/iconfont.eot |
😄 可以这样写 '@icon-url': `"${path.relative( './~/antd/lib/style/*', './src/assets/iconfont/iconfont' )}"`
|
修改为这样后会报错,
@afc163 打包发布后字体文件无法访问 |
说明你路径配置的有问题,请保证字体文件不是 404. |
我在主题theme.js 去掉icon-url 使用ali的在线地址后,打包后依然没有对应的字体文件,css文件中的字体连接还是在线的url |
暂时使用在线字体地址 |
dva - 0.6.0
antd - 2.6.4
问题:使用theme.js 来修改icon-url来源为本地,在开发环境下一切正常,但是build后的包文件去不含有iconfont字体文件,打包后的index.css font-family引用地址仍然与开发环境下一致。
修改主题的theme.js
webpack配置文件 webpack.config.js
大神指点一下这个是为什么
The text was updated successfully, but these errors were encountered: