Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 4d2e39b

Browse files
Merge branch 'master' into release-to-master-pr805
2 parents ae75255 + 68d47be commit 4d2e39b

File tree

5 files changed

+68
-31
lines changed

5 files changed

+68
-31
lines changed

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
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

‎templates/webpack.angular.js‎

Lines changed: 17 additions & 7 deletions
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(),

‎templates/webpack.javascript.js‎

Lines changed: 17 additions & 8 deletions
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(),

‎templates/webpack.typescript.js‎

Lines changed: 17 additions & 8 deletions
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(),

‎templates/webpack.vue.js‎

Lines changed: 16 additions & 7 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /