加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
ZY 提交于 2021-01-27 16:38 . delete tagsview fix bug
/*
* @Description:配置文件
* @Author: ZY
* @Date: 2020-12-07 11:41:22
* @LastEditors: ZY
* @LastEditTime: 2021-01-27 15:17:29
*/
const { resolve } = require('path')
const path = require('path')
const WebpackBar = require('webpackbar');
const dayjs = require('dayjs')
const time = dayjs().format('YYYY-M-D HH:mm:ss')
process.env.VUE_APP_UPDATE_TIME = time
const {
publicPath,
assetsDir,
outputDir,
lintOnSave,
transpileDependencies,
title,
devPort,
} = require('./src/config/default/vue.custom.config')
module.exports = {
publicPath,
assetsDir,
outputDir,
lintOnSave,
transpileDependencies,
devServer: {
hot: true,
port: devPort,
open: true,
noInfo: false,
overlay: {
warnings: true,
errors: true,
},
},
pluginOptions: {
'style-resources-loader': {
preProcessor: 'scss',
patterns: [
path.resolve(__dirname, 'src/styles/_variables.scss'),
path.resolve(__dirname, 'src/styles/_mixins.scss'),
]
}
},
configureWebpack(){
return {
resolve:{
alias:{
'@':resolve('src'),
'*':resolve(''),
'Assets':resolve('src/assets')
}
},
module:{
rules: [
{
test: /\.(json5?|ya?ml)$/, // target json, json5, yaml and yml files
loader: '@intlify/vue-i18n-loader',
include: [ // Use `Rule.include` to specify the files of locale messages to be pre-compiled
path.resolve(__dirname, 'src/lang')
]
},
],
},
plugins:[
new WebpackBar({
name:title,
})
]
}
},
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化