Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android, ios): disable minifying of javascript #11206

Closed
wants to merge 8 commits into from
8 changes: 4 additions & 4 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
// manually inject the build profile settings into the tiapp.xml
switch (this.deployType) {
case 'production':
this.minifyJS = true;
this.minifyJS = false;
this.encryptJS = true;
this.minifyCSS = true;
this.allowDebugging = false;
Expand All @@ -951,7 +951,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
break;

case 'test':
this.minifyJS = true;
this.minifyJS = false;
this.encryptJS = true;
this.minifyCSS = true;
this.allowDebugging = true;
Expand All @@ -975,8 +975,8 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
logger.warn(__('The %s tiapp.xml property has been deprecated, please use the %s option to bypass JavaScript minification', 'ti.android.compilejs'.cyan, '--skip-js-minify'.cyan));
}

if (cli.argv['skip-js-minify']) {
this.minifyJS = false;
if (cli.argv['minify']) {
this.minifyJS = true;
}

// Do we write out process.env into a file in the app to use?
Expand Down
8 changes: 4 additions & 4 deletions iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@ iOSBuilder.prototype.validate = function validate(logger, config, cli) {
switch (this.deployType) {
case 'production':
this.showErrorController = false;
this.minifyJS = true;
this.minifyJS = false;
this.encryptJS = true;
this.minifyCSS = true;
this.allowDebugging = false;
Expand All @@ -1791,7 +1791,7 @@ iOSBuilder.prototype.validate = function validate(logger, config, cli) {

case 'test':
this.showErrorController = true;
this.minifyJS = true;
this.minifyJS = false;
this.encryptJS = true;
this.minifyCSS = true;
this.allowDebugging = true;
Expand All @@ -1810,8 +1810,8 @@ iOSBuilder.prototype.validate = function validate(logger, config, cli) {
this.includeAllTiModules = true;
}

if (cli.argv['skip-js-minify']) {
this.minifyJS = false;
if (cli.argv['minify']) {
this.minifyJS = true;
}
if (cli.argv['hide-error-controller']) {
this.showErrorController = false;
Expand Down