NativeScript / NativeScript/nativescript-cli

Uglify Doesn't seem to work

未关闭
#4,780 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
1.1k
派生
204
平均合并
1 天 9 小时
30 天内合并 PR
8

描述

When I ran tns run ios --release --env.uglify or tns build android --release --env.uglify it doesn't seem to Uglify the code at all, I can see the source code and it's readable. Am I doing this wrong somehow?

My app is written with NativeScript core and TypeScript.
My environment:

$ tns doctor
✔ Getting environment information 

No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 10.2.1 satisfies minimum required version 9.
✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 5.4.0 and the latest available version is 5.4.2.
✔ Component tns-core-modules has 5.4.3 version and is up to date.
✔ Component tns-android has 5.4.0 version and is up to date.
✔ Component tns-ios has 5.4.2 version and is up to date.
tns plugin
Dependencies:
┌────────────────────────────────┬─────────┐
│ Plugin                         │ Version │
│ @types/base-64                 │ ^0.1.3  │
│ @types/utf8                    │ ^2.1.6  │
│ base-64                        │ ^0.1.0  │
│ nativescript-camera            │ ^4.4.0  │
│ nativescript-checkbox          │ ^3.0.3  │
│ nativescript-clipboard         │ ^1.1.7  │
│ nativescript-fingerprint-auth  │ ^6.2.0  │
│ nativescript-https             │ ^1.0.3  │
│ nativescript-image-zoom        │ ^3.0.3  │
│ nativescript-mapbox            │ ^4.4.1  │
│ nativescript-masked-text-field │ ^4.0.1  │
│ nativescript-menu              │ ^1.0.3  │
│ nativescript-orientation       │ ^2.2.1  │
│ nativescript-pdf-view          │ ^2.0.1  │
│ nativescript-platform-css      │ ^1.6.7  │
│ nativescript-secure-storage    │ ^2.4.0  │
│ nativescript-social-share      │ ^1.5.1  │
│ nativescript-stripe            │ ^5.0.8  │
│ nativescript-toasty            │ ^1.3.0  │
│ nativescript-ui-listview       │ ^6.1.0  │
│ nativescript-ui-sidedrawer     │ ^6.0.0  │
│ nativescript-videoplayer       │ ^4.2.1  │
│ nativescript-wonderpush        │ ^0.1.1  │
│ rxjs                           │ ~6.3.0  │
│ tns-core-modules               │ ^5.4.0  │
│ utf8                           │ ^3.0.0  │
└────────────────────────────────┴─────────┘
Dev Dependencies:
┌─────────────────────────────┬─────────┐
│ Plugin                      │ Version │
│ nativescript-dev-sass       │ ^1.7.0  │
│ nativescript-dev-typescript │ ~0.7.0  │
│ nativescript-dev-webpack    │ ^0.22.0 │
│ nativescript-theme-core     │ ^1.0.4  │
│ node-sass                   │ ^4.11.0 │
│ tns-platform-declarations   │ ^5.2.0  │
│ tslint                      │ ~5.11.0 │
└─────────────────────────────┴─────────┘

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用列出的 NativeScript 和 plugin 版本,通过报告中的 tns run ios --release --env.uglifytns build android --release --env.uglify 命令复现该问题。跟踪 release build 的 uglification 入口点,并比较两个平台上生成的输出;完成的标准是 release 输出不再可读,并且已针对报告中的设置验证该行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, typescript
领域
build-system, cli
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。