dcloudio / dcloudio/uni-app

生产环境去console无效

Open
#2,136 0 comments 0 reactions 0 assignees View on GitHub
h5 提供了复现方案
Dominant language
JavaScript
Stars
41.6k
Forks
3.7k
Avg merge
7h 6m
Merged PRs (30d)
6

Description

**问题描述**
生产环境去console无效

**复现步骤**
1. 按照[官方文档](https://uniapp.dcloud.io/collocation/vue-config)配置,通过terser-webpack-plugin生产环境去除console
2. 开启manifest.json中摇树优化
3. 打包

**预期结果**
打包后console依然存在

**实际结果**
无报错

**系统信息:**
- 发行平台: H5平台
- 操作系统 全设备
- HBuilderX版本:2.8.11.20200907
- uni-app版本 不知道怎么看,反正是最新版的hbx创建的项目
- 设备信息 全设备

**补充信息**
经测试,开启TreeShaking影响去console就失效了,
关闭TreeShaking就正常了

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.