Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit a2608ce

Browse files
committed
refactor: set mode to production when uglify is passed
1 parent 70db73c commit a2608ce

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

templates/webpack.angular.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ module.exports = env => {
3737
appResourcesPath = "app/App_Resources",
3838

3939
// You can provide the following flags when running 'tns run android|ios'
40-
production, // --env.production
4140
aot, // --env.aot
4241
snapshot, // --env.snapshot
4342
uglify, // --env.uglify
@@ -54,7 +53,7 @@ module.exports = env => {
5453
const entryPath = `.${sep}${entryModule}`;
5554

5655
const config = {
57-
mode: production ? "production" : "development",
56+
mode: uglify ? "production" : "development",
5857
context: appFullPath,
5958
watchOptions: {
6059
ignored: [

templates/webpack.javascript.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ module.exports = env => {
3737
appResourcesPath = "app/App_Resources",
3838

3939
// You can provide the following flags when running 'tns run android|ios'
40-
production, // --env.production
4140
snapshot, // --env.snapshot
4241
uglify, // --env.uglify
4342
report, // --env.report
@@ -50,7 +49,7 @@ module.exports = env => {
5049
const entryPath = `.${sep}${entryModule}.js`;
5150

5251
const config = {
53-
mode: production ? "production" : "development",
52+
mode: uglify ? "production" : "development",
5453
context: appFullPath,
5554
watchOptions: {
5655
ignored: [

templates/webpack.typescript.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ module.exports = env => {
3737
appResourcesPath = "app/App_Resources",
3838

3939
// You can provide the following flags when running 'tns run android|ios'
40-
production, // --env.production
4140
snapshot, // --env.snapshot
4241
uglify, // --env.uglify
4342
report, // --env.report
@@ -50,7 +49,7 @@ module.exports = env => {
5049
const entryPath = `.${sep}${entryModule}.ts`;
5150

5251
const config = {
53-
mode: production ? "production" : "development",
52+
mode: uglify ? "production" : "development",
5453
context: appFullPath,
5554
watchOptions: {
5655
ignored: [

0 commit comments

Comments
 (0)