-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
run.log
157 lines (146 loc) · 6.88 KB
/
run.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
[Real File Compile Result]
import { defineComponent, ref } from 'vue'
const __sfc__ = defineComponent({
setup() {
return {
inputModel: ref(''),
modelValue: ref(''),
list: [1, 2, 3]
}
},
})
import { createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, createVNode as _createVNode, Fragment as _Fragment, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, renderList as _renderList, renderSlot as _renderSlot, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, toDisplayString as _toDisplayString, vModelText as _vModelText, vShow as _vShow, withCtx as _withCtx, withDirectives as _withDirectives, withModifiers as _withModifiers } from "vue"
function render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_abc_def = _resolveComponent("abc-def")
const _component_another_element = _resolveComponent("another-element")
const _directive_directive = _resolveDirective("directive")
const _directive_test_directive = _resolveDirective("test-directive")
return _withDirectives((_openBlock(), _createBlock(_component_abc_def, {
modelValue: _ctx.modelValue,
"onUpdate:modelValue": $event => ((_ctx.modelValue) = $event),
modelModifiers: {lazy: true},
"another-model-value": _ctx.modelValue,
"onUpdate:anotherModelValue": $event => ((_ctx.modelValue) = $event),
"another-model-valueModifiers": {trim: true},
"test-bound": _ctx.bar+_ctx.baz,
disabled: "disabled",
onClick: _withModifiers(() => {}, ["prevent"]),
onHello: _ctx.world,
class: ""
}, {
"test-slot": _withCtx(({ value, another: renamed }) => [_createTextVNode(" test " + _toDisplayString(value) + " " + _toDisplayString(renamed), 1 /* TEXT */)]),
"custom-slot": _withCtx(({ prop }) => [
_createElementVNode("span", {
class: "span-class"
}, " Span text ", -1 /* HOISTED */),
_createTextVNode(" " + _toDisplayString(prop), 1 /* TEXT */)
]),
default: _withCtx(() => [
_createTextVNode(" The text of the node " + _toDisplayString(_ctx.dynamicValue) + " ", 1 /* TEXT */),
_renderSlot(_ctx.$slots, "default"),
_renderSlot(_ctx.$slots, "named-slot-1"),
_renderSlot(_ctx.$slots, "named-slot-2", {
prop: _ctx.modelValue,
class: "ye"
}, () => [_createElementVNode("div", null, " default content ", -1 /* HOISTED */)]),
_createCommentVNode(" Comment "),
_createVNode(_component_another_element),
_createTextVNode(" yet another text ", 1 /* TEXT */),
_withDirectives(_createElementVNode("input", null, null, -1 /* HOISTED */), [
[_vModelText, _ctx.inputModel]
[
_directive_directive,
_ctx.baz,
"foo",
{
bar: true,
buzz: true
}
]
]),
_createCommentVNode(" Todo remove space between these elements, otherwise it breaks the invariant in conditional codegen "),
true
? (_openBlock(), _createElementBlock("div", null, "if div", -1 /* HOISTED */))
: false
? (_openBlock(), _createElementBlock("span", null, "else-if span", -1 /* HOISTED */))
: _createCommentVNode("v-if", true),
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(list, (i) => (
(_openBlock(), _createElementBlock("span", {
key: i
}, "hey", -1 /* HOISTED */))
)), 128 /* KEYED_FRAGMENT */)),
_withDirectives(_createElementVNode("br", null, null, -1 /* HOISTED */), [
[_vShow, false]
]),
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(3, (i) => (
(_openBlock(), _createBlock(_component_another_element, {
key: i
})
)), 128 /* KEYED_FRAGMENT */)),
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(list, ([item1, item2], index) => (
(_openBlock(), _createElementBlock(_Fragment, null, [
_createTextVNode(" hey ", 1 /* TEXT */),
_createElementVNode("span", {
key: index
}, _toDisplayString(item1) + _toDisplayString(index), -1 /* HOISTED */),
_createElementVNode("div", {
key: index,
class: _normalizeClass(["both regular and bound", [item2,index]])
}, null, -1 /* HOISTED */),
_createElementVNode("div", {
key: index,
class: "just regular class"
}, null, -1 /* HOISTED */),
_createElementVNode("div", {
key: index,
class: _normalizeClass([_ctx.member.expr,_ctx.globalIdent,item2,index])
}, null, -1 /* HOISTED */)
], -1 /* HOISTED */))
)), 256 /* UNKEYED_FRAGMENT */)),
false
? (_openBlock(), _createElementBlock(_Fragment, null, [_createTextVNode(" this is a v-if template ", 1 /* TEXT */)], -1 /* HOISTED */))
: true
? (_openBlock(), _createElementBlock(_Fragment, null, [_createTextVNode(" another v-else-if template ", 1 /* TEXT */)], -1 /* HOISTED */))
: (_openBlock(), _createElementBlock(_Fragment, null, [_createTextVNode(" else template ", 1 /* TEXT */)], -1 /* HOISTED */)),
_createElementVNode("div", {
style: _normalizeStyle([{"background-color":"red",color:"#000",content:"''","grid-template-column":"repeat(1fr, min(auto-fit, 100px))"}, {backgroundColor:_ctx.v?"yellow":undefined})]
}, null, -1 /* HOISTED */)
])
})), [
[
_directive_test_directive,
_ctx.foo-_ctx.bar,
"test-argument",
{
foo: true,
bar: true
}
]
])
}
__sfc__.render = render
export default __sfc__
Time took: 417.866µs
[Synthetic Compile Result]
const __sfc__ = {
name: 'TestComponent'
}
import { createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, createVNode as _createVNode, openBlock as _openBlock, resolveComponent as _resolveComponent, toDisplayString as _toDisplayString, withCtx as _withCtx } from "vue"
function render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_CustomComponent = _resolveComponent("CustomComponent")
return (_openBlock(), _createElementBlock("span", {
class: "yes"
}, [
_createTextVNode("Hello world" + _toDisplayString(_ctx.testRef) + "yes yes", 1 /* TEXT */),
_createElementVNode("i", null, "italics, mm" + _toDisplayString(_ctx.hey), -1 /* HOISTED */),
_createVNode(_component_CustomComponent, null, {
default: _withCtx(() => [_createTextVNode("italics, mm" + _toDisplayString(_ctx.hey), 1 /* TEXT */)])
}),
_createTextVNode("end of span node", 1 /* TEXT */)
], -1 /* HOISTED */))
}
__sfc__.render = render
export default __sfc__
Time took: 38.064µs
SWC result: [_ctx.a,_ctx.b,_ctx.c,{d:_ctx.d}]
Time took for transform: 45.956µs