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

Commit e55e12b

Browse files
Merge branch 'master' into vchimev/merge-release-into-master
2 parents c4b4fee + 3bdad78 commit e55e12b

File tree

6 files changed

+69
-32
lines changed

6 files changed

+69
-32
lines changed

Diff for: CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
<a name="0.20.0"></a>
18-
# [0.20.0](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.18.3...0.20.0) (2019-02-08)
18+
# [0.20.0](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.19.2...0.20.0) (2019-02-08)
1919

2020

2121
### Bug Fixes

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-dev-webpack",
3-
"version": "0.20.1",
3+
"version": "0.21.0",
44
"main": "index",
55
"description": "",
66
"homepage": "http://www.telerik.com",

Diff for: templates/webpack.angular.js

+17-7
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ module.exports = env => {
5454
const tsConfigName = "tsconfig.tns.json";
5555
const entryModule = `${nsWebpack.getEntryModule(appFullPath)}.ts`;
5656
const entryPath = `.${sep}${entryModule}`;
57+
const entries = { bundle: entryPath };
58+
if (platform === "ios") {
59+
entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules.js";
60+
};
61+
5762
const ngCompilerTransformers = [];
5863
const additionalLazyModuleResources = [];
5964
if (aot) {
@@ -100,9 +105,7 @@ module.exports = env => {
100105
]
101106
},
102107
target: nativescriptTarget,
103-
entry: {
104-
bundle: entryPath,
105-
},
108+
entry: entries,
106109
output: {
107110
pathinfo: false,
108111
path: dist,
@@ -137,6 +140,7 @@ module.exports = env => {
137140
},
138141
devtool: sourceMap ? "inline-source-map" : "none",
139142
optimization: {
143+
runtimeChunk: "single",
140144
splitChunks: {
141145
cacheGroups: {
142146
vendor: {
@@ -254,10 +258,16 @@ module.exports = env => {
254258
{ from: { glob: "**/*.png" } },
255259
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
256260
// Generate a bundle starter script and activate it in package.json
257-
new nsWebpack.GenerateBundleStarterPlugin([
258-
"./vendor",
259-
"./bundle",
260-
]),
261+
new nsWebpack.GenerateBundleStarterPlugin(
262+
// Don't include `runtime.js` when creating a snapshot. The plugin
263+
// configures the WebPack runtime to be generated inside the snapshot
264+
// module and no `runtime.js` module exist.
265+
(snapshot ? [] : ["./runtime"])
266+
.concat([
267+
"./vendor",
268+
"./bundle",
269+
])
270+
),
261271
// For instructions on how to set up workers with webpack
262272
// check out https://github.com/nativescript/worker-loader
263273
new NativeScriptWorkerPlugin(),

Diff for: templates/webpack.javascript.js

+17-8
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ module.exports = env => {
4949

5050
const entryModule = nsWebpack.getEntryModule(appFullPath);
5151
const entryPath = `.${sep}${entryModule}.js`;
52+
const entries = { bundle: entryPath };
53+
if (platform === "ios") {
54+
entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules.js";
55+
};
5256

5357
const config = {
5458
mode: uglify ? "production" : "development",
@@ -62,9 +66,7 @@ module.exports = env => {
6266
]
6367
},
6468
target: nativescriptTarget,
65-
entry: {
66-
bundle: entryPath,
67-
},
69+
entry: entries,
6870
output: {
6971
pathinfo: false,
7072
path: dist,
@@ -98,7 +100,8 @@ module.exports = env => {
98100
"__dirname": false,
99101
},
100102
devtool: sourceMap ? "inline-source-map" : "none",
101-
optimization: {
103+
optimization: {
104+
runtimeChunk: "single",
102105
splitChunks: {
103106
cacheGroups: {
104107
vendor: {
@@ -207,10 +210,16 @@ module.exports = env => {
207210
{ from: { glob: "**/*.png" } },
208211
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
209212
// Generate a bundle starter script and activate it in package.json
210-
new nsWebpack.GenerateBundleStarterPlugin([
211-
"./vendor",
212-
"./bundle",
213-
]),
213+
new nsWebpack.GenerateBundleStarterPlugin(
214+
// Don't include `runtime.js` when creating a snapshot. The plugin
215+
// configures the WebPack runtime to be generated inside the snapshot
216+
// module and no `runtime.js` module exist.
217+
(snapshot ? [] : ["./runtime"])
218+
.concat([
219+
"./vendor",
220+
"./bundle",
221+
])
222+
),
214223
// For instructions on how to set up workers with webpack
215224
// check out https://github.com/nativescript/worker-loader
216225
new NativeScriptWorkerPlugin(),

Diff for: templates/webpack.typescript.js

+17-8
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ module.exports = env => {
4949

5050
const entryModule = nsWebpack.getEntryModule(appFullPath);
5151
const entryPath = `.${sep}${entryModule}.ts`;
52+
const entries = { bundle: entryPath };
53+
if (platform === "ios") {
54+
entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules.js";
55+
};
5256

5357
const config = {
5458
mode: uglify ? "production" : "development",
@@ -62,9 +66,7 @@ module.exports = env => {
6266
]
6367
},
6468
target: nativescriptTarget,
65-
entry: {
66-
bundle: entryPath,
67-
},
69+
entry: entries,
6870
output: {
6971
pathinfo: false,
7072
path: dist,
@@ -100,7 +102,8 @@ module.exports = env => {
100102
"__dirname": false,
101103
},
102104
devtool: sourceMap ? "inline-source-map" : "none",
103-
optimization: {
105+
optimization: {
106+
runtimeChunk: "single",
104107
splitChunks: {
105108
cacheGroups: {
106109
vendor: {
@@ -220,10 +223,16 @@ module.exports = env => {
220223
{ from: { glob: "**/*.png" } },
221224
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
222225
// Generate a bundle starter script and activate it in package.json
223-
new nsWebpack.GenerateBundleStarterPlugin([
224-
"./vendor",
225-
"./bundle",
226-
]),
226+
new nsWebpack.GenerateBundleStarterPlugin(
227+
// Don't include `runtime.js` when creating a snapshot. The plugin
228+
// configures the WebPack runtime to be generated inside the snapshot
229+
// module and no `runtime.js` module exist.
230+
(snapshot ? [] : ["./runtime"])
231+
.concat([
232+
"./vendor",
233+
"./bundle",
234+
])
235+
),
227236
// For instructions on how to set up workers with webpack
228237
// check out https://github.com/nativescript/worker-loader
229238
new NativeScriptWorkerPlugin(),

Diff for: templates/webpack.vue.js

+16-7
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ module.exports = env => {
5555

5656
const entryModule = nsWebpack.getEntryModule(appFullPath);
5757
const entryPath = `.${sep}${entryModule}`;
58+
const entries = { bundle: entryPath };
59+
if (platform === "ios") {
60+
entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules.js";
61+
};
5862
console.log(`Bundling application for entryPath ${entryPath}...`);
5963

6064
const config = {
@@ -70,9 +74,7 @@ module.exports = env => {
7074
},
7175
target: nativescriptTarget,
7276
// target: nativeScriptVueTarget,
73-
entry: {
74-
bundle: entryPath,
75-
},
77+
entry: entries,
7678
output: {
7779
pathinfo: false,
7880
path: dist,
@@ -111,6 +113,7 @@ module.exports = env => {
111113
},
112114
devtool: "none",
113115
optimization: {
116+
runtimeChunk: "single",
114117
splitChunks: {
115118
cacheGroups: {
116119
vendor: {
@@ -227,10 +230,16 @@ module.exports = env => {
227230
{ from: { glob: "assets/**/*" } },
228231
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
229232
// Generate a bundle starter script and activate it in package.json
230-
new nsWebpack.GenerateBundleStarterPlugin([
231-
"./vendor",
232-
"./bundle",
233-
]),
233+
new nsWebpack.GenerateBundleStarterPlugin(
234+
// Don't include `runtime.js` when creating a snapshot. The plugin
235+
// configures the WebPack runtime to be generated inside the snapshot
236+
// module and no `runtime.js` module exist.
237+
(snapshot ? [] : ["./runtime"])
238+
.concat([
239+
"./vendor",
240+
"./bundle",
241+
])
242+
),
234243
// For instructions on how to set up workers with webpack
235244
// check out https://github.com/nativescript/worker-loader
236245
new NativeScriptWorkerPlugin(),

0 commit comments

Comments
 (0)