exports[`comile > bindings 1`] = `
"import { watchEffect } from 'vue';
-import { template, children, insert, setText } from 'vue/vapor';
+import { template, children, createTextNode, insert, setText } from 'vue/vapor';
const t0 = template(\`<div>count is <!>.</div>\`);
export function render() {
const n0 = t0();
},
],
} = children(root);
- const n2 = document.createTextNode(count.value);
+ const n2 = createTextNode(count.value);
insert(n2, n1, n3);
watchEffect(() => {
setText(n2, undefined, count.value);
`;
exports[`comile > directives > v-once > basic 1`] = `
-"import { template, children, insert, setText, setAttr } from 'vue/vapor';
+"import { template, children, createTextNode, insert, setText, setAttr } from 'vue/vapor';
const t0 = template(\`<div> <span></span></div>\`);
export function render() {
const n0 = t0();
},
],
} = children(root);
- const n2 = document.createTextNode(msg.value);
+ const n2 = createTextNode(msg.value);
insert(n2, n1, 0 /* InsertPosition.FIRST */);
setText(n2, undefined, msg.value);
setAttr(n3, 'class', undefined, clz.value);
exports[`comile > static + dynamic root 1`] = `
"import { watchEffect } from 'vue';
-import { template, insert, setText } from 'vue/vapor';
+import { template, createTextNode, insert, setText } from 'vue/vapor';
const t0 = template(\`2\`);
export function render() {
const n0 = t0();
- const n1 = document.createTextNode(1);
+ const n1 = createTextNode(1);
insert(n1, n0, 0 /* InsertPosition.FIRST */);
- const n2 = document.createTextNode(3);
+ const n2 = createTextNode(3);
insert(n2, n0);
watchEffect(() => {
setText(n1, undefined, 1);
exports[`fixtures 1`] = `
"import { defineComponent as _defineComponent } from 'vue'
import { watchEffect } from 'vue'
-import { template, children, insert, setText, on, setHtml } from 'vue/vapor'
+import { template, children, createTextNode, insert, setText, on, setHtml } from 'vue/vapor'
const t0 = template(\`<h1 id=\\"title\\">Counter</h1><p>Count: </p><p>Double: </p><button>Increment</button><div></div><input type=\\"text\\"><p>once: </p><p>{{ count }}</p>\`)
import { ref, computed } from 'vue'
return (() => {
const n0 = t0()
const { 1: [n1], 2: [n3], 3: [n5], 4: [n6], 6: [n7],} = children(root)
-const n2 = document.createTextNode(count.value)
+const n2 = createTextNode(count.value)
insert(n2, n1)
-const n4 = document.createTextNode(double.value)
+const n4 = createTextNode(double.value)
insert(n4, n3)
-const n8 = document.createTextNode(count.value)
+const n8 = createTextNode(count.value)
insert(n8, n7)
setText(n8, undefined, count.value)
watchEffect(() => {