9 Star 1 Fork 0

雪村/tiyu_wxapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 890 Bytes
一键复制 编辑 原始数据 按行查看 历史
jiaopanzi 提交于 2023-09-25 23:37 . 去掉多余文件1
const TransformPages = require('uni-read-pages')
const {
webpack
} = new TransformPages()
// const CompressionWebpackPlugin = require('compression-webpack-plugin')
// const productionGzipExtensionszipExtensions = ['js', 'css']
module.exports = {
configureWebpack: {
plugins: [
new webpack.DefinePlugin({
ROUTES: webpack.DefinePlugin.runtimeValue(() => {
const tfPages = new TransformPages({
includes: ['path', 'name', 'aliasPath', 'meta']
});
return JSON.stringify(tfPages.routes)
}, true)
})
// new CompressionWebpackPlugin({
// filename: '[path].gz[query]',
// algorithm: 'gzip',
// test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),//匹配文件名
// threshold: 10240,//对10K以上的数据进行压缩
// minRatio: 0.8,
// deleteOriginalAssets:false,//是否删除源文件
// })
]
},
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sunhappy0318/tiyu_wxapp.git
git@gitee.com:sunhappy0318/tiyu_wxapp.git
sunhappy0318
tiyu_wxapp
tiyu_wxapp
master

搜索帮助