4 Star 14 Fork 4

聚是一团火 / 疫团Go -- 移动端

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
iain 提交于 2022-04-21 01:35 . 合并配药分支
/**
* @file 打包配置
* @author Iain
* @creation 2021/11/27
*/
const TransformPages = require("uni-read-pages");
// // 开启 Gzip压缩
const CompressionWebpackPlugin = require("compression-webpack-plugin");
const { webpack } = new TransformPages();
// https://cli.vuejs.org/config/
module.exports = {
devServer: {
// host: '0.0.0.0',
// port: '3006',
open: true,
overlay: {
warnings: false,
errors: true,
},
// 配置跨域
// proxy: {
// // api 为转发路径
// "/api": {
// // 目标地址
// target: "http://127.0.0.1:9901",
// },
// },
},
configureWebpack: {
plugins: [
new webpack.DefinePlugin({
ROUTES: webpack.DefinePlugin.runtimeValue(() => {
const tfPages = new TransformPages({
includes: ["path", "name", "meta", "aliasPath"],
});
return JSON.stringify(tfPages.routes);
}, true),
}),
// // 开启 Gzip压缩
// new CompressionWebpackPlugin({
// algorithm: "gzip",
// test: /\.(js|css)$/, // 匹配文件名
// threshold: 10240, // 对超过10k的数据压缩
// deleteOriginalAssets: false, // 不删除源文件
// minRatio: 0.8 // 压缩比
// })
],
},
};
JavaScript
1
https://gitee.com/Gathering-is-a-fire/yi-tuan-gou--unapp.git
git@gitee.com:Gathering-is-a-fire/yi-tuan-gou--unapp.git
Gathering-is-a-fire
yi-tuan-gou--unapp
疫团Go -- 移动端
master

搜索帮助