Skip to content

Commit 4bc0fa2

Browse files
committed
Android runtime error fix
1 parent e9dd7c2 commit 4bc0fa2

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

index.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,25 @@ const nativeConfig = (api, projectOptions, env, projectRoot, platform) => {
255255
.target(nativescriptTarget)
256256
.end();
257257

258-
config.entryPoints // clear out old config.entryPoints and install new
259-
.clear()
260-
.end()
261-
.entry('bundle')
262-
// .entry(entries)
263-
.add(entryPath)
264-
.end();
258+
if (platform === 'android') {
259+
config.entryPoints
260+
.clear()
261+
.end()
262+
.entry('bundle')
263+
.add(entryPath)
264+
.add('@nativescript/core/globals')
265+
.add('@nativescript/core/ui/frame')
266+
.add('@nativescript/core/ui/frame/activity')
267+
.end();
268+
} else {
269+
config.entryPoints // clear out old config.entryPoints and install new
270+
.clear()
271+
.end()
272+
.entry('bundle')
273+
// .entry(entries)
274+
.add(entryPath)
275+
.end();
276+
}
265277

266278
// clear out old config.output and install new
267279
config.output.clear().end();

0 commit comments

Comments
 (0)