vue打包后如下element图标不显示

控制台报错

显示没有找到element-icons资源
解决办法:
在build文件下的utils.js文件中添加这一句publicPath:‘…/…/’
找到我如下代码中去添加
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
在Vue项目中使用Element UI时,打包后发现图标无法正常显示,控制台报找不到element-icons资源的错误。解决方法是在build/utils.js中添加publicPath: '../..',调整资源路径,重新打包后,图标显示恢复正常。
vue打包后如下element图标不显示

控制台报错

显示没有找到element-icons资源
解决办法:
在build文件下的utils.js文件中添加这一句publicPath:‘…/…/’
找到我如下代码中去添加
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
1851

被折叠的 条评论
为什么被折叠?