fix(compiler-sfc): fix treeshaking of namespace import when used in template
fix #5209
This commit is contained in:
@@ -777,6 +777,7 @@ exports[`SFC compile <script setup> inlineTemplate mode avoid unref() when neces
|
||||
import { ref } from 'vue'
|
||||
import Foo, { bar } from './Foo.vue'
|
||||
import other from './util'
|
||||
import * as tree from './tree'
|
||||
|
||||
export default {
|
||||
setup(__props) {
|
||||
@@ -795,7 +796,8 @@ return (_ctx, _cache) => {
|
||||
]),
|
||||
_: 1 /* STABLE */
|
||||
}),
|
||||
_createElementVNode(\\"div\\", { onClick: fn }, _toDisplayString(count.value) + \\" \\" + _toDisplayString(constant) + \\" \\" + _toDisplayString(_unref(maybe)) + \\" \\" + _toDisplayString(_unref(lett)) + \\" \\" + _toDisplayString(_unref(other)), 1 /* TEXT */)
|
||||
_createElementVNode(\\"div\\", { onClick: fn }, _toDisplayString(count.value) + \\" \\" + _toDisplayString(constant) + \\" \\" + _toDisplayString(_unref(maybe)) + \\" \\" + _toDisplayString(_unref(lett)) + \\" \\" + _toDisplayString(_unref(other)), 1 /* TEXT */),
|
||||
_createTextVNode(\\" \\" + _toDisplayString(tree.foo()), 1 /* TEXT */)
|
||||
], 64 /* STABLE_FRAGMENT */))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user