wang hou sheng 8 months ago
parent 216f93f5b0
commit e5ec947c5a
  1. 22
      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;

Loading…
Cancel
Save