Browse Source

fix: micro application icon show error

master
wangxiang 2 years ago
parent
commit
0a3c43de33
No known key found for this signature in database
GPG Key ID: 1BA7946AB6B232E4
  1. 25
      vue.config.js

25
vue.config.js

@ -27,21 +27,6 @@ module.exports = { @@ -27,21 +27,6 @@ module.exports = {
config
.when(process.env.NODE_ENV !== 'development',
config => {
// 默认css文件中的url()不能根据__webpack_public_path__来动态改变根路径,将其编译成 base64 内嵌到css文件
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;
})
config.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
@ -65,6 +50,16 @@ module.exports = { @@ -65,6 +50,16 @@ module.exports = {
}
}
})
// fixme: 默认css文件中的url()不能根据__webpack_public_path__来动态改变根路径
config.module
.rule('fonts')
.test(/.(ttf|otf|eot|woff|woff2)$/)
.use("url-loader")
.loader("url-loader")
.tap((options) => ({
name: "/static/fonts/[name].[ext]",
}))
}
)
},

Loading…
Cancel
Save