This repository was archived by the owner on Aug 7, 2021. It is now read-only.
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ if (!process.env.npm_config_argv) {
14
14
15
15
const escape = arg => `"${ arg } "` ;
16
16
const isTnsCommand = flag => flag . endsWith ( "-app" ) ;
17
+ const shouldUglify = ( ) => process . env . npm_config_uglify ;
17
18
18
19
const npmArgs = JSON . parse ( process . env . npm_config_argv ) . original ;
19
20
const tnsArgs = getTnsArgs ( npmArgs ) . map ( escape ) ;
@@ -67,9 +68,9 @@ function cleanBuildArtifacts(platform) {
67
68
getTnsVersion ( ) . then ( versionString => {
68
69
const version = versionToNumber ( versionString ) ;
69
70
70
- // for nativescript-cli v3.0.1 and below
71
71
// the android build artifacts should be cleaned manually
72
- if ( version <= 301 ) {
72
+ // for nativescript-cli v3.0.1 and below or if using uglify
73
+ if ( version <= 301 || shouldUglify ( ) ) {
73
74
gradlewClean ( ) . then ( resolve ) . catch ( throwError ) ;
74
75
} else {
75
76
return resolve ( ) ;
@@ -133,7 +134,7 @@ function webpack(platform) {
133
134
`--config=webpack.config.js` ,
134
135
`--progress` ,
135
136
`--env.${ platform } ` ,
136
- process . env . npm_config_uglify && `--env.uglify` ,
137
+ shouldUglify ( ) && `--env.uglify` ,
137
138
] ;
138
139
139
140
spawnChildProcess ( ...args )
You can’t perform that action at this time.
0 commit comments