微前端相关
文章目录
子应用中的element-UI的icon在主应用中访问子应用组件的时候不能加载处理问题
在子应用的Vue.config.js文件中加入:
config.module
.rule("fonts")
.test(/.(ttf|otf|eot|woff|woff2)$/)
.use("url-loader")
.loader("url-loader")
.tap(options => {
options = {
// limit: 10000,
name: '/static/fonts/[name].[ext]',
}
return options
})这样主应用访问的时候就能访问到了,子应用自己起服务是没这个问题的。

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论