1 Star 0 Fork 112

_分开旅行- / koi-screen

forked from 于金金 / koi-screen 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
于金金 提交于 2022-09-22 16:07 . 3、细节优化
/*
* @Author: ・ᴗ・
* @CreateDate: 2022-08-26 07:26:25
* @Signature: 知足且上进,温柔且坚定・ᴗ・
*/
const { defineConfig } = require('@vue/cli-service')
const path = require('path')
module.exports = defineConfig({
chainWebpack: config => {
config.plugin('html')
.tap(args => {
// 修改完浏览器网页标题需要重启项目才能生效
args[0].title = '小锦鲤可视化平台';
return args;
}
)
},
lintOnSave: false,
transpileDependencies: true,
publicPath: './', // 基本路径
outputDir: 'dist', // 输出文件目录
assetsDir: "static", //放置生成的静态文件目录(js css img)
productionSourceMap: false, // 生产环境是否生成 sourceMap 文件
// 警告 webpack 的性能提示
configureWebpack : {
performance: {
hints:'warning',
// 入口起点的最大体积 整数类型(以字节为单位)
maxEntrypointSize: 50000000,
// 生成文件的最大体积 整数类型(以字节为单位 300k)
maxAssetSize: 30000000,
// 只给出 js 文件的性能提示
assetFilter: function(assetFilename) {
return assetFilename.endsWith('.js');
}
}
},
devServer: {
port: 8017,
// 解决新版本 Invalid Host header
historyApiFallback: true,
allowedHosts: 'all',
open: false // 自动打开浏览器
}
})
Java
1
https://gitee.com/wenbin1001/koi-screen.git
git@gitee.com:wenbin1001/koi-screen.git
wenbin1001
koi-screen
koi-screen
master

搜索帮助