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

Commit 0bde5f9

Browse files
committed
feat: respect production mode based on release option
Implements: #911
1 parent 467ebae commit 0bde5f9

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
@@ -109,7 +110,7 @@ module.exports = env => {
109110
}
110111

111112
const config = {
112-
mode: uglify ? "production" : "development",
113+
mode: production ? "production" : "development",
113114
context: appFullPath,
114115
externals,
115116
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
@@ -69,7 +70,7 @@ module.exports = env => {
6970
}
7071

7172
const config = {
72-
mode: uglify ? "production" : "development",
73+
mode: production ? "production" : "development",
7374
context: appFullPath,
7475
externals,
7576
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
@@ -73,7 +74,7 @@ module.exports = env => {
7374
}
7475

7576
const config = {
76-
mode: uglify ? "production" : "development",
77+
mode: production ? "production" : "development",
7778
context: appFullPath,
7879
externals,
7980
watchOptions: {

0 commit comments

Comments
 (0)