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

Commit be9ac9b

Browse files
committed
feat: respect production mode based on release option
Implements: #911
1 parent 2aa1f60 commit be9ac9b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Diff for: templates/webpack.angular.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ module.exports = env => {
4343

4444
// You can provide the following flags when running 'tns run android|ios'
4545
aot, // --env.aot
46-
snapshot, // --env.snapshot
46+
snapshot, // --env.snapshot,
47+
production, // --env.production
4748
uglify, // --env.uglify
4849
report, // --env.report
4950
sourceMap, // --env.sourceMap
@@ -108,7 +109,7 @@ module.exports = env => {
108109
}
109110

110111
const config = {
111-
mode: uglify ? "production" : "development",
112+
mode: production ? "production" : "development",
112113
context: appFullPath,
113114
externals,
114115
watchOptions: {

Diff for: templates/webpack.javascript.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module.exports = env => {
3838

3939
// You can provide the following flags when running 'tns run android|ios'
4040
snapshot, // --env.snapshot
41+
production, // --env.production
4142
uglify, // --env.uglify
4243
report, // --env.report
4344
sourceMap, // --env.sourceMap
@@ -68,7 +69,7 @@ module.exports = env => {
6869
}
6970

7071
const config = {
71-
mode: uglify ? "production" : "development",
72+
mode: production ? "production" : "development",
7273
context: appFullPath,
7374
externals,
7475
watchOptions: {

Diff for: templates/webpack.typescript.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module.exports = env => {
3939

4040
// You can provide the following flags when running 'tns run android|ios'
4141
snapshot, // --env.snapshot
42+
production, // --env.production
4243
uglify, // --env.uglify
4344
report, // --env.report
4445
sourceMap, // --env.sourceMap
@@ -72,7 +73,7 @@ module.exports = env => {
7273
}
7374

7475
const config = {
75-
mode: uglify ? "production" : "development",
76+
mode: production ? "production" : "development",
7677
context: appFullPath,
7778
externals,
7879
watchOptions: {

0 commit comments

Comments
 (0)