From e5ec947c5a31d3ca6d16328807b9f4a22aaff613 Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Wed, 3 Apr 2024 03:54:43 +0800 Subject: [PATCH] 1 --- vue.config.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/vue.config.js b/vue.config.js index acceac1..b8a5fd6 100644 --- a/vue.config.js +++ b/vue.config.js @@ -5,7 +5,7 @@ const GitRevision = new GitRevisionPlugin() const buildDate = JSON.stringify(new Date().toLocaleString()) const createThemeColorReplacerPlugin = require('./config/plugin.config') -function resolve (dir) { +function resolve(dir) { return path.join(__dirname, dir) } @@ -35,6 +35,9 @@ const vueConfig = { publicPath: process.env.NODE_ENV === 'production' ? './' : '/', configureWebpack: { + performance: { + hints: false, + }, // webpack plugins plugins: [ // Ignore all locale files of moment.js @@ -50,8 +53,7 @@ const vueConfig = { }, chainWebpack: (config) => { - config.resolve.alias - .set('@$', resolve('src')) + config.resolve.alias.set('@$', resolve('src')) const svgRule = config.module.rule('svg') svgRule.uses.clear() @@ -66,7 +68,7 @@ const vueConfig = { .use('file-loader') .loader('file-loader') .options({ - name: 'assets/[name].[hash:8].[ext]' + name: 'assets/[name].[hash:8].[ext]', }) // if prod is on @@ -96,17 +98,17 @@ const vueConfig = { // 'link-color': '#1890ff', 'font-size-base': '13px', - 'border-radius-base': '2px' + 'border-radius-base': '2px', }, // DO NOT REMOVE THIS LINE - javascriptEnabled: true - } - } + javascriptEnabled: true, + }, + }, }, devServer: { // development server port 8000 - port: 8220 + port: 8220, // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11 // proxy: { // '/api': { @@ -124,7 +126,7 @@ const vueConfig = { productionSourceMap: false, lintOnSave: false, // babel-loader no-ignore node_modules/* - transpileDependencies: [] + transpileDependencies: [], } // preview.pro.loacg.com only do not use in your production;