Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions NativeScript/runtime/NativeScript.mm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "NativeScript.h"
#include "Runtime.h"
#include "RuntimeConfig.h"
#include "runtime/NativeScriptException.h"
#include "ffi/shared/Tasks.h"
#include "js_native_api.h"
#include "jsr.h"
#include "runtime/NativeScriptException.h"

using namespace nativescript;

Expand Down Expand Up @@ -33,7 +33,10 @@ - (void)runScriptString:(NSString*)script runLoop:(BOOL)runLoop {
}

- (void)runMainApplication {
std::string spec = "./app/index.js";
// Boot from the application directory so the entry resolves through its
// package.json "main" (falling back to index.*) — a literal index.js is not
// guaranteed to exist (CLI-built apps ship bundle.js).
std::string spec = RuntimeConfig.ApplicationPath;
try {
runtime_->RunModule(spec);
} catch (const NativeScriptException& e) {
Expand Down
Loading