Skip to content

Commit 7335fd0

Browse files
committed
fix: don't import Vue in utils
fixes nativescript-vue-template-compiler build
1 parent 1cf4858 commit 7335fd0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Diff for: platform/nativescript/framework.js

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import NavigatorPlugin from './plugins/navigator-plugin'
1313
// import DecoderPlugin from './plugins/decoder-plugin'
1414
import RouterPlugin from './plugins/router-plugin'
1515

16+
import { setVue } from './util'
17+
setVue(Vue)
18+
1619
Vue.use(ModalPlugin)
1720
Vue.use(NavigatorPlugin)
1821
// Vue.use(DecoderPlugin)

Diff for: platform/nativescript/util/index.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import { makeMap, once } from 'shared/util'
22
import { isKnownView, getViewMeta } from '../element-registry'
3-
import Vue from '../framework'
43

54
export const isReservedTag = makeMap('template', true)
65

6+
let _Vue
7+
8+
export function setVue(Vue) {
9+
_Vue = Vue
10+
}
11+
712
export const canBeLeftOpenTag = function(el) {
813
return getViewMeta(el).canBeLeftOpenTag
914
}
@@ -42,7 +47,7 @@ const infoTrace = once(() => {
4247
})
4348

4449
export function trace(message) {
45-
if (Vue.config.silent) {
50+
if (_Vue && _Vue.config.silent) {
4651
return infoTrace()
4752
}
4853

0 commit comments

Comments
 (0)