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

Commit 00ecaa0

Browse files
committed
fix: Emit inspector_modules.js as a separate entry point for iOS
The iOS Runtime calls it explicitly by name and it has to be emitted in `tns_modules/tns_core_modules` Refs: NativeScript/ios-jsc#1054, NativeScript/ios-jsc#1055 NativeScript/ios-jsc#1056, NativeScript/ios-jsc#1057
1 parent 6482522 commit 00ecaa0

File tree

4 files changed

+21
-12
lines changed

4 files changed

+21
-12
lines changed

Diff for: templates/webpack.angular.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ module.exports = env => {
5454

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,

Diff for: templates/webpack.javascript.js

+5-3
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,

Diff for: templates/webpack.typescript.js

+5-3
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,

Diff for: templates/webpack.vue.js

+5-3
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,

0 commit comments

Comments
 (0)