Vue 3.0 repro
Minimal starting fiddle for Vue.js 3 bug reports
HTML
<script src="https://unpkg.com/vue@3"></script>
<div id="app">
{{ msg }}
</div>
JavaScript
const { createApp, getCurrentInstance } = Vue
const app = createApp({
template: `<test v-highlight="'red'"></test>`,
})
app.component('test', {
name: 'test',
template: `<div>{{msg}}</div>`,
data: () => ({ msg: 'Hello Vue.js' }),
setup() {
const instance = getCurrentInstance()
console.log(instance)
}
})
app.directive('highlight', {
beforeMount(el, binding, vnode) {
el.style.background = binding.value
}
})
app.mount('#app')