Skip to content

Commit 3cc5ea8

Browse files
author
Gary Gambill
committed
NS 6.3 Compatible
Bugfix: webpack-chain config to v6.0
1 parent d21578a commit 3cc5ea8

File tree

2 files changed

+36
-37
lines changed

2 files changed

+36
-37
lines changed

Diff for: generator/index.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ module.exports = async (api, options, rootOptions) => {
5353
api.extendPackage({
5454
nativescript: {
5555
id: 'org.nativescript.application',
56-
'tns-ios': {
57-
version: '6.1.0'
58-
},
5956
'tns-android': {
60-
version: '6.1.0'
57+
version: '6.3.1'
58+
},
59+
'tns-ios': {
60+
version: '6.3.0'
6161
}
6262
},
6363
scripts: {
@@ -78,12 +78,12 @@ module.exports = async (api, options, rootOptions) => {
7878
'clean:ios': 'rimraf platforms/ios'
7979
},
8080
dependencies: {
81-
'nativescript-vue': '^2.4.0',
82-
'tns-core-modules': '^6.1.0'
81+
'nativescript-vue': '^2.5.0-alpha.3',
82+
'tns-core-modules': '^6.3.2'
8383
},
8484
devDependencies: {
85-
'nativescript-dev-webpack': '^1.2.0',
86-
'nativescript-vue-template-compiler': '^2.4.0',
85+
'nativescript-dev-webpack': '^1.4.0',
86+
'nativescript-vue-template-compiler': '^2.5.0-alpha.3',
8787
'nativescript-worker-loader': '~0.9.5',
8888
'node-sass': '^4.12.0',
8989
'string-replace-loader': '^2.2.0',
@@ -128,8 +128,8 @@ module.exports = async (api, options, rootOptions) => {
128128
dependencies: {},
129129
devDependencies: {
130130
'fork-ts-checker-webpack-plugin': '^1.5.0',
131-
'terser-webpack-plugin': '^2.0.1',
132-
'tns-platform-declarations': '^6.1.0'
131+
'terser-webpack-plugin': '^2.1.3',
132+
'tns-platform-declarations': '^6.3.2'
133133
}
134134
});
135135

Diff for: index.js

+26-27
Original file line numberDiff line numberDiff line change
@@ -343,26 +343,25 @@ const nativeConfig = (api, projectOptions, env, projectRoot, platform) => {
343343

344344
config.optimization.minimize(Boolean(production));
345345
config.optimization
346-
.minimizer([
347-
new TerserPlugin({
348-
parallel: true,
349-
cache: true,
350-
sourceMap: isAnySourceMapEnabled,
351-
terserOptions: {
352-
output: {
353-
comments: false,
354-
semicolons: !isAnySourceMapEnabled
355-
},
356-
compress: {
357-
// The Android SBG has problems parsing the output
358-
// when these options are enabled
359-
collapse_vars: platform !== 'android',
360-
sequences: platform !== 'android'
361-
},
362-
keep_fnames: true
363-
}
364-
})
365-
])
346+
.minimizer('terser')
347+
.use(TerserPlugin, [{
348+
parallel: true,
349+
cache: true,
350+
sourceMap: isAnySourceMapEnabled,
351+
terserOptions: {
352+
output: {
353+
comments: false,
354+
semicolons: !isAnySourceMapEnabled
355+
},
356+
compress: {
357+
// The Android SBG has problems parsing the output
358+
// when these options are enabled
359+
collapse_vars: platform !== 'android',
360+
sequences: platform !== 'android'
361+
},
362+
keep_fnames: true
363+
}
364+
}])
366365
.end();
367366

368367
config.module
@@ -591,9 +590,9 @@ const nativeConfig = (api, projectOptions, env, projectRoot, platform) => {
591590
.uses.get('css-loader')
592591
.get('options'),
593592
{
594-
minimize: false,
593+
// minimize: false,
595594
url: false,
596-
data: '$PLATFORM: ' + platform + ';'
595+
// data: '$PLATFORM: ' + platform + ';'
597596
}
598597
)
599598
)
@@ -609,8 +608,8 @@ const nativeConfig = (api, projectOptions, env, projectRoot, platform) => {
609608
.get('options'),
610609
{
611610
// minimize: false,
612-
url: false,
613-
data: '$PLATFORM: ' + platform + ';'
611+
// url: false,
612+
prependData: '$PLATFORM: ' + platform + ';'
614613
}
615614
)
616615
)
@@ -655,7 +654,7 @@ const nativeConfig = (api, projectOptions, env, projectRoot, platform) => {
655654
{
656655
// minimize: false,
657656
url: false,
658-
data: '$PLATFORM: ' + platform
657+
// data: '$PLATFORM: ' + platform
659658
}
660659
)
661660
)
@@ -671,8 +670,8 @@ const nativeConfig = (api, projectOptions, env, projectRoot, platform) => {
671670
.get('options'),
672671
{
673672
minimize: false,
674-
url: false,
675-
data: '$PLATFORM: ' + platform
673+
// url: false,
674+
prependData: '$PLATFORM: ' + platform
676675
}
677676
)
678677
)

0 commit comments

Comments
 (0)