File tree 1 file changed +5
-3
lines changed
platform/nativescript/runtime
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change
1
+ // Ensure `application` module is loaded
2
+ // before overriding `global.__onLiveSyncCore`
3
+ import { run , on , launchEvent } from 'tns-core-modules/application'
1
4
import { warn } from 'core/util/index'
2
5
import { patch } from './patch'
3
6
import { mountComponent } from 'core/instance/lifecycle'
@@ -50,7 +53,6 @@ Vue.prototype.$mount = function(el, hydrating) {
50
53
}
51
54
52
55
Vue . prototype . $start = function ( ) {
53
- const application = require ( 'tns-core-modules/application' )
54
56
let self = this
55
57
const AppConstructor = Vue . extend ( this . $options )
56
58
@@ -59,7 +61,7 @@ Vue.prototype.$start = function() {
59
61
Vue . component ( entry . meta . component . name , entry . meta . component )
60
62
} )
61
63
62
- application . on ( application . launchEvent , args => {
64
+ on ( launchEvent , args => {
63
65
if ( self . $el ) {
64
66
self . $destroy ( )
65
67
self = new AppConstructor ( )
@@ -69,7 +71,7 @@ Vue.prototype.$start = function() {
69
71
args . root = self . $el . nativeView
70
72
} )
71
73
72
- application . run ( )
74
+ run ( )
73
75
}
74
76
75
77
// Define a `nativeView` getter in every NS vue instance
You can’t perform that action at this time.
0 commit comments