فهرست منبع

chore: 调整font

zhangyuhan 3 ماه پیش
والد
کامیت
739c69c4ab
1فایلهای تغییر یافته به همراه10 افزوده شده و 1 حذف شده
  1. 10 1
      vue.config.js

+ 10 - 1
vue.config.js

@@ -33,7 +33,16 @@ module.exports = {
     ]
   },
   chainWebpack: (config) => {
-    config.module.rule('fonts').use('url-loader').loader('url-loader').options({}).end();
+    const fontRule = config.module.rule('fonts');
+    fontRule.uses.clear();
+    fontRule
+        .use('file-loader')
+        .loader('file-loader')
+        .options({
+          name: 'fonts/[name].[hash:8].[ext]',
+          publicPath: process.env.NODE_ENV === 'production' ? '/qmx_page_admin' : '',
+        })
+        .end();
   },
   devServer: {
     // open: false,