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

Commit

Permalink
fix: Emit inspector_modules.js as a separate entry point for iOS
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mbektchiev committed Feb 13, 2019
1 parent 6482522 commit 00ecaa0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
9 changes: 6 additions & 3 deletions templates/webpack.angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ module.exports = env => {

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

const ngCompilerTransformers = [];
const additionalLazyModuleResources = [];
if (aot) {
Expand Down Expand Up @@ -100,9 +105,7 @@ module.exports = env => {
]
},
target: nativescriptTarget,
entry: {
bundle: entryPath,
},
entry: entries,
output: {
pathinfo: false,
path: dist,
Expand Down
8 changes: 5 additions & 3 deletions templates/webpack.javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ module.exports = env => {

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

const config = {
mode: uglify ? "production" : "development",
Expand All @@ -62,9 +66,7 @@ module.exports = env => {
]
},
target: nativescriptTarget,
entry: {
bundle: entryPath,
},
entry: entries,
output: {
pathinfo: false,
path: dist,
Expand Down
8 changes: 5 additions & 3 deletions templates/webpack.typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ module.exports = env => {

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

const config = {
mode: uglify ? "production" : "development",
Expand All @@ -62,9 +66,7 @@ module.exports = env => {
]
},
target: nativescriptTarget,
entry: {
bundle: entryPath,
},
entry: entries,
output: {
pathinfo: false,
path: dist,
Expand Down
8 changes: 5 additions & 3 deletions templates/webpack.vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ module.exports = env => {

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

const config = {
Expand All @@ -70,9 +74,7 @@ module.exports = env => {
},
target: nativescriptTarget,
// target: nativeScriptVueTarget,
entry: {
bundle: entryPath,
},
entry: entries,
output: {
pathinfo: false,
path: dist,
Expand Down

0 comments on commit 00ecaa0

Please sign in to comment.