diff --git a/package.json b/package.json index be5399e..e92deb4 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@types/babel__core": "^7.20.5", "@types/node": "^20.11.0", "@typescript-eslint/eslint-plugin": "^6.18.1", - "@vitest/coverage-v8": "^0.34.6", + "@vitest/coverage-v8": "^1.2.0", "bumpp": "^9.2.1", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", @@ -30,7 +30,7 @@ "tsup": "^8.0.1", "typescript": "^5.3.3", "vite": "^5.0.11", - "vitest": "^0.34.6" + "vitest": "^1.2.0" }, "version": "1.1.5" } diff --git a/packages/babel-plugin-jsx/test/__snapshots__/snapshot.test.ts.snap b/packages/babel-plugin-jsx/test/__snapshots__/snapshot.test.ts.snap index ae1175c..732fc0f 100644 --- a/packages/babel-plugin-jsx/test/__snapshots__/snapshot.test.ts.snap +++ b/packages/babel-plugin-jsx/test/__snapshots__/snapshot.test.ts.snap @@ -1,26 +1,26 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`_Fragment already imported > _Fragment already imported 1`] = ` -"import { createVNode as _createVNode, createTextVNode as _createTextVNode, Fragment as _Fragment2 } from \\"vue\\"; +"import { createVNode as _createVNode, createTextVNode as _createTextVNode, Fragment as _Fragment2 } from "vue"; import { Fragment as _Fragment } from 'vue'; -const Root1 = () => _createVNode(_Fragment2, null, [_createTextVNode(\\"root1\\")]); -const Root2 = () => _createVNode(_Fragment, null, [_createTextVNode(\\"root2\\")]);" +const Root1 = () => _createVNode(_Fragment2, null, [_createTextVNode("root1")]); +const Root2 = () => _createVNode(_Fragment, null, [_createTextVNode("root2")]);" `; exports[`MereProps Order > MereProps Order 1`] = ` -"import { createVNode as _createVNode, mergeProps as _mergeProps, createTextVNode as _createTextVNode } from \\"vue\\"; -_createVNode(\\"button\\", _mergeProps({ - \\"loading\\": true +"import { createVNode as _createVNode, mergeProps as _mergeProps, createTextVNode as _createTextVNode } from "vue"; +_createVNode("button", _mergeProps({ + "loading": true }, x, { - \\"type\\": \\"submit\\" -}), [_createTextVNode(\\"btn\\")], 16, [\\"loading\\"]);" + "type": "submit" +}), [_createTextVNode("btn")], 16, ["loading"]);" `; exports[`Merge class/ style attributes into array > Merge class/ style attributes into array 1`] = ` -"import { createVNode as _createVNode } from \\"vue\\"; -_createVNode(\\"div\\", { - \\"class\\": [\\"a\\", b], - \\"style\\": [\\"color: red\\", s] +"import { createVNode as _createVNode } from "vue"; +_createVNode("div", { + "class": ["a", b], + "style": ["color: red", s] }, null, 6);" `; @@ -30,153 +30,153 @@ createVNode('div', null, ['Without JSX should work']);" `; exports[`Without props > Without props 1`] = ` -"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from \\"vue\\"; -_createVNode(\\"a\\", null, [_createTextVNode(\\"a\\")]);" +"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue"; +_createVNode("a", null, [_createTextVNode("a")]);" `; exports[`custom directive > custom directive 1`] = ` -"import { withDirectives as _withDirectives, createVNode as _createVNode, resolveDirective as _resolveDirective, resolveComponent as _resolveComponent } from \\"vue\\"; -_withDirectives(_createVNode(_resolveComponent(\\"A\\"), null, null, 512), [[_resolveDirective(\\"cus\\"), x]]);" +"import { withDirectives as _withDirectives, createVNode as _createVNode, resolveDirective as _resolveDirective, resolveComponent as _resolveComponent } from "vue"; +_withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("cus"), x]]);" `; exports[`custom directive > custom directive 2`] = ` -"import { withDirectives as _withDirectives, createVNode as _createVNode, resolveDirective as _resolveDirective, resolveComponent as _resolveComponent, Fragment as _Fragment } from \\"vue\\"; -_createVNode(_Fragment, null, [_withDirectives(_createVNode(_resolveComponent(\\"A\\"), null, null, 512), [[_resolveDirective(\\"xxx\\"), x]]), _withDirectives(_createVNode(_resolveComponent(\\"A\\"), null, null, 512), [[_resolveDirective(\\"xxx\\"), x]]), _withDirectives(_createVNode(_resolveComponent(\\"A\\"), null, null, 512), [[_resolveDirective(\\"xxx\\"), x, 'y']]), _withDirectives(_createVNode(_resolveComponent(\\"A\\"), null, null, 512), [[_resolveDirective(\\"xxx\\"), x, 'y', { +"import { withDirectives as _withDirectives, createVNode as _createVNode, resolveDirective as _resolveDirective, resolveComponent as _resolveComponent, Fragment as _Fragment } from "vue"; +_createVNode(_Fragment, null, [_withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x]]), _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x]]), _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, 'y']]), _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, 'y', { a: true, b: true -}]]), _withDirectives(_createVNode(_resolveComponent(\\"A\\"), null, null, 512), [[_resolveDirective(\\"xxx\\"), x, void 0, { +}]]), _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, void 0, { a: true, b: true -}]]), _withDirectives(_createVNode(_resolveComponent(\\"A\\"), null, null, 512), [[_resolveDirective(\\"xxx\\"), x, y, { +}]]), _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, y, { a: true, b: true -}]]), _withDirectives(_createVNode(_resolveComponent(\\"A\\"), null, null, 512), [[_resolveDirective(\\"xxx\\"), x, y, { +}]]), _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, y, { a: true, b: true }]])]);" `; exports[`disable object slot syntax with defaultSlot > defaultSlot 1`] = ` -"import { createVNode as _createVNode, resolveComponent as _resolveComponent } from \\"vue\\"; -_createVNode(_resolveComponent(\\"Badge\\"), null, { +"import { createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("Badge"), null, { default: () => [slots.default()], _: 1 });" `; exports[`dynamic type in input > dynamic type in input 1`] = ` -"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelDynamic as _vModelDynamic } from \\"vue\\"; -_withDirectives(_createVNode(\\"input\\", { - \\"type\\": type, - \\"onUpdate:modelValue\\": $event => test = $event -}, null, 8, [\\"type\\", \\"onUpdate:modelValue\\"]), [[_vModelDynamic, test]]);" +"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelDynamic as _vModelDynamic } from "vue"; +_withDirectives(_createVNode("input", { + "type": type, + "onUpdate:modelValue": $event => test = $event +}, null, 8, ["type", "onUpdate:modelValue"]), [[_vModelDynamic, test]]);" `; exports[`input[type="checkbox"] > input[type="checkbox"] 1`] = ` -"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelCheckbox as _vModelCheckbox } from \\"vue\\"; -_withDirectives(_createVNode(\\"input\\", { - \\"type\\": \\"checkbox\\", - \\"onUpdate:modelValue\\": $event => test = $event -}, null, 8, [\\"onUpdate:modelValue\\"]), [[_vModelCheckbox, test]]);" +"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelCheckbox as _vModelCheckbox } from "vue"; +_withDirectives(_createVNode("input", { + "type": "checkbox", + "onUpdate:modelValue": $event => test = $event +}, null, 8, ["onUpdate:modelValue"]), [[_vModelCheckbox, test]]);" `; exports[`input[type="radio"] > input[type="radio"] 1`] = ` -"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelRadio as _vModelRadio, Fragment as _Fragment } from \\"vue\\"; -_createVNode(_Fragment, null, [_withDirectives(_createVNode(\\"input\\", { - \\"type\\": \\"radio\\", - \\"value\\": \\"1\\", - \\"onUpdate:modelValue\\": $event => test = $event, - \\"name\\": \\"test\\" -}, null, 8, [\\"onUpdate:modelValue\\"]), [[_vModelRadio, test]]), _withDirectives(_createVNode(\\"input\\", { - \\"type\\": \\"radio\\", - \\"value\\": \\"2\\", - \\"onUpdate:modelValue\\": $event => test = $event, - \\"name\\": \\"test\\" -}, null, 8, [\\"onUpdate:modelValue\\"]), [[_vModelRadio, test]])]);" +"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelRadio as _vModelRadio, Fragment as _Fragment } from "vue"; +_createVNode(_Fragment, null, [_withDirectives(_createVNode("input", { + "type": "radio", + "value": "1", + "onUpdate:modelValue": $event => test = $event, + "name": "test" +}, null, 8, ["onUpdate:modelValue"]), [[_vModelRadio, test]]), _withDirectives(_createVNode("input", { + "type": "radio", + "value": "2", + "onUpdate:modelValue": $event => test = $event, + "name": "test" +}, null, 8, ["onUpdate:modelValue"]), [[_vModelRadio, test]])]);" `; exports[`input[type="text"] .lazy modifier > input[type="text"] .lazy modifier 1`] = ` -"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelText as _vModelText } from \\"vue\\"; -_withDirectives(_createVNode(\\"input\\", { - \\"onUpdate:modelValue\\": $event => test = $event -}, null, 8, [\\"onUpdate:modelValue\\"]), [[_vModelText, test, void 0, { +"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelText as _vModelText } from "vue"; +_withDirectives(_createVNode("input", { + "onUpdate:modelValue": $event => test = $event +}, null, 8, ["onUpdate:modelValue"]), [[_vModelText, test, void 0, { lazy: true }]]);" `; exports[`input[type="text"] > input[type="text"] 1`] = ` -"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelText as _vModelText } from \\"vue\\"; -_withDirectives(_createVNode(\\"input\\", { - \\"onUpdate:modelValue\\": $event => test = $event -}, null, 8, [\\"onUpdate:modelValue\\"]), [[_vModelText, test]]);" +"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelText as _vModelText } from "vue"; +_withDirectives(_createVNode("input", { + "onUpdate:modelValue": $event => test = $event +}, null, 8, ["onUpdate:modelValue"]), [[_vModelText, test]]);" `; exports[`isCustomElement > isCustomElement 1`] = ` -"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from \\"vue\\"; -_createVNode(\\"foo\\", null, [_createVNode(\\"span\\", null, [_createTextVNode(\\"foo\\")])]);" +"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue"; +_createVNode("foo", null, [_createVNode("span", null, [_createTextVNode("foo")])]);" `; exports[`named import specifier \`Keep Alive\` > named import specifier \`Keep Alive\` 1`] = ` -"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from \\"vue\\"; +"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue"; import { KeepAlive } from 'vue'; -_createVNode(KeepAlive, null, [_createTextVNode(\\"123\\")]);" +_createVNode(KeepAlive, null, [_createTextVNode("123")]);" `; exports[`namespace specifier \`Keep Alive\` > namespace specifier \`Keep Alive\` 1`] = ` -"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from \\"vue\\"; +"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue"; import * as Vue from 'vue'; -_createVNode(Vue.KeepAlive, null, [_createTextVNode(\\"123\\")]);" +_createVNode(Vue.KeepAlive, null, [_createTextVNode("123")]);" `; exports[`override props multiple > multiple 1`] = ` -"import { createVNode as _createVNode, resolveComponent as _resolveComponent } from \\"vue\\"; -_createVNode(_resolveComponent(\\"A\\"), { - \\"loading\\": true, +"import { createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("A"), { + "loading": true, ...a, b: 1, c: { d: 2 }, - \\"class\\": \\"x\\", - \\"style\\": x + "class": "x", + "style": x }, null);" `; exports[`override props single > single 1`] = ` -"import { createVNode as _createVNode } from \\"vue\\"; -_createVNode(\\"div\\", a, null);" +"import { createVNode as _createVNode } from "vue"; +_createVNode("div", a, null);" `; exports[`passing object slots via JSX children multiple expressions > multiple expressions 1`] = ` -"import { createVNode as _createVNode, resolveComponent as _resolveComponent } from \\"vue\\"; -_createVNode(_resolveComponent(\\"A\\"), null, { +"import { createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("A"), null, { default: () => [foo, bar], _: 1 });" `; exports[`passing object slots via JSX children single expression, function expression > single expression, function expression 1`] = ` -"import { createVNode as _createVNode, resolveComponent as _resolveComponent } from \\"vue\\"; -_createVNode(_resolveComponent(\\"A\\"), null, { - default: () => \\"foo\\" +"import { createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("A"), null, { + default: () => "foo" });" `; exports[`passing object slots via JSX children single expression, non-literal value: runtime check > single expression, non-literal value: runtime check 1`] = ` "let _slot; -import { createVNode as _createVNode, isVNode as _isVNode, resolveComponent as _resolveComponent } from \\"vue\\"; +import { createVNode as _createVNode, isVNode as _isVNode, resolveComponent as _resolveComponent } from "vue"; function _isSlot(s) { return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s); } const foo = () => 1; -_createVNode(_resolveComponent(\\"A\\"), null, _isSlot(_slot = foo()) ? _slot : { +_createVNode(_resolveComponent("A"), null, _isSlot(_slot = foo()) ? _slot : { default: () => [_slot], _: 1 });" `; exports[`reassign variable as component > reassign variable as component 1`] = ` -"import { isVNode as _isVNode, createVNode as _createVNode } from \\"vue\\"; +"import { isVNode as _isVNode, createVNode as _createVNode } from "vue"; import { defineComponent } from 'vue'; function _isSlot(s) { return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s); @@ -186,7 +186,7 @@ const A = defineComponent({ setup(_, { slots }) { - return () => _createVNode(\\"span\\", null, [slots.default()]); + return () => _createVNode("span", null, [slots.default()]); } }); const _a2 = 2; @@ -201,144 +201,144 @@ a = _createVNode(A, null, _isSlot(a) ? a : { `; exports[`select > select 1`] = ` -"import { withDirectives as _withDirectives, vModelSelect as _vModelSelect, createVNode as _createVNode, createTextVNode as _createTextVNode } from \\"vue\\"; -_withDirectives(_createVNode(\\"select\\", { - \\"onUpdate:modelValue\\": $event => test = $event -}, [_createVNode(\\"option\\", { - \\"value\\": \\"1\\" -}, [_createTextVNode(\\"a\\")]), _createVNode(\\"option\\", { - \\"value\\": 2 -}, [_createTextVNode(\\"b\\")]), _createVNode(\\"option\\", { - \\"value\\": 3 -}, [_createTextVNode(\\"c\\")])], 8, [\\"onUpdate:modelValue\\"]), [[_vModelSelect, test]]);" +"import { withDirectives as _withDirectives, vModelSelect as _vModelSelect, createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue"; +_withDirectives(_createVNode("select", { + "onUpdate:modelValue": $event => test = $event +}, [_createVNode("option", { + "value": "1" +}, [_createTextVNode("a")]), _createVNode("option", { + "value": 2 +}, [_createTextVNode("b")]), _createVNode("option", { + "value": 3 +}, [_createTextVNode("c")])], 8, ["onUpdate:modelValue"]), [[_vModelSelect, test]]);" `; exports[`set pragma to custom > custom 1`] = ` -"import { createTextVNode as _createTextVNode } from \\"vue\\"; -custom(\\"div\\", null, [_createTextVNode(\\"pragma\\")]);" +"import { createTextVNode as _createTextVNode } from "vue"; +custom("div", null, [_createTextVNode("pragma")]);" `; exports[`should keep \`import * as Vue from "vue"\` > should keep \`import * as Vue from "vue"\` 1`] = ` -"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from \\"vue\\"; +"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue"; import * as Vue from 'vue'; -_createVNode(\\"div\\", null, [_createTextVNode(\\"Vue\\")]);" +_createVNode("div", null, [_createTextVNode("Vue")]);" `; exports[`single no need for a mergeProps call > single no need for a mergeProps call 1`] = ` -"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from \\"vue\\"; -_createVNode(\\"div\\", x, [_createTextVNode(\\"single\\")], 16);" +"import { createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue"; +_createVNode("div", x, [_createTextVNode("single")], 16);" `; exports[`specifiers should be merged into a single importDeclaration > specifiers should be merged into a single importDeclaration 1`] = ` -"import { createVNode as _createVNode } from \\"vue\\"; +"import { createVNode as _createVNode } from "vue"; import { createVNode, Fragment as _Fragment } from 'vue'; import { vShow } from 'vue'; _createVNode(_Fragment, null, null);" `; exports[`textarea > textarea 1`] = ` -"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelText as _vModelText } from \\"vue\\"; -_withDirectives(_createVNode(\\"textarea\\", { - \\"onUpdate:modelValue\\": $event => test = $event -}, null, 8, [\\"onUpdate:modelValue\\"]), [[_vModelText, test]]);" +"import { withDirectives as _withDirectives, createVNode as _createVNode, vModelText as _vModelText } from "vue"; +_withDirectives(_createVNode("textarea", { + "onUpdate:modelValue": $event => test = $event +}, null, 8, ["onUpdate:modelValue"]), [[_vModelText, test]]);" `; exports[`use "@jsx" comment specify pragma > use "@jsx" comment specify pragma 1`] = ` -"import { createTextVNode as _createTextVNode } from \\"vue\\"; +"import { createTextVNode as _createTextVNode } from "vue"; /* @jsx custom */ -custom(\\"div\\", { - \\"id\\": \\"custom\\" -}, [_createTextVNode(\\"Hello\\")]);" +custom("div", { + "id": "custom" +}, [_createTextVNode("Hello")]);" `; exports[`use "model" as the prop name > use "model" as the prop name 1`] = ` -"import { createVNode as _createVNode, resolveComponent as _resolveComponent } from \\"vue\\"; -_createVNode(_resolveComponent(\\"C\\"), { - \\"model\\": foo, - \\"onUpdate:model\\": $event => foo = $event -}, null, 8, [\\"model\\", \\"onUpdate:model\\"]);" +"import { createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("C"), { + "model": foo, + "onUpdate:model": $event => foo = $event +}, null, 8, ["model", "onUpdate:model"]);" `; exports[`using v-slots without children should not be spread > using v-slots without children should not be spread 1`] = ` -"import { createVNode as _createVNode, resolveDirective as _resolveDirective, resolveComponent as _resolveComponent } from \\"vue\\"; -_createVNode(_resolveComponent(\\"A\\"), null, slots);" +"import { createVNode as _createVNode, resolveDirective as _resolveDirective, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("A"), null, slots);" `; exports[`v-model target value support variable > v-model target value support variable 1`] = ` -"import { createVNode as _createVNode, resolveComponent as _resolveComponent, Fragment as _Fragment } from \\"vue\\"; +"import { createVNode as _createVNode, resolveComponent as _resolveComponent, Fragment as _Fragment } from "vue"; const foo = 'foo'; const a = () => 'a'; const b = { c: 'c' }; -_createVNode(_Fragment, null, [_createVNode(_resolveComponent(\\"A\\"), { +_createVNode(_Fragment, null, [_createVNode(_resolveComponent("A"), { [foo]: xx, - [\\"onUpdate\\" + foo]: $event => xx = $event -}, null, 16), _createVNode(_resolveComponent(\\"B\\"), { - \\"modelValue\\": xx, - \\"modelModifiers\\": { - \\"a\\": true + ["onUpdate" + foo]: $event => xx = $event +}, null, 16), _createVNode(_resolveComponent("B"), { + "modelValue": xx, + "modelModifiers": { + "a": true }, - \\"onUpdate:modelValue\\": $event => xx = $event -}, null, 8, [\\"modelValue\\", \\"onUpdate:modelValue\\"]), _createVNode(_resolveComponent(\\"C\\"), { + "onUpdate:modelValue": $event => xx = $event +}, null, 8, ["modelValue", "onUpdate:modelValue"]), _createVNode(_resolveComponent("C"), { [foo]: xx, - [foo + \\"Modifiers\\"]: { - \\"a\\": true + [foo + "Modifiers"]: { + "a": true }, - [\\"onUpdate\\" + foo]: $event => xx = $event -}, null, 16), _createVNode(_resolveComponent(\\"D\\"), { + ["onUpdate" + foo]: $event => xx = $event +}, null, 16), _createVNode(_resolveComponent("D"), { [foo === 'foo' ? 'a' : 'b']: xx, - [(foo === 'foo' ? 'a' : 'b') + \\"Modifiers\\"]: { - \\"a\\": true + [(foo === 'foo' ? 'a' : 'b') + "Modifiers"]: { + "a": true }, - [\\"onUpdate\\" + (foo === 'foo' ? 'a' : 'b')]: $event => xx = $event -}, null, 16), _createVNode(_resolveComponent(\\"E\\"), { + ["onUpdate" + (foo === 'foo' ? 'a' : 'b')]: $event => xx = $event +}, null, 16), _createVNode(_resolveComponent("E"), { [a()]: xx, - [a() + \\"Modifiers\\"]: { - \\"a\\": true + [a() + "Modifiers"]: { + "a": true }, - [\\"onUpdate\\" + a()]: $event => xx = $event -}, null, 16), _createVNode(_resolveComponent(\\"F\\"), { + ["onUpdate" + a()]: $event => xx = $event +}, null, 16), _createVNode(_resolveComponent("F"), { [b.c]: xx, - [b.c + \\"Modifiers\\"]: { - \\"a\\": true + [b.c + "Modifiers"]: { + "a": true }, - [\\"onUpdate\\" + b.c]: $event => xx = $event + ["onUpdate" + b.c]: $event => xx = $event }, null, 16)]);" `; exports[`v-show > v-show 1`] = ` -"import { withDirectives as _withDirectives, createVNode as _createVNode, vShow as _vShow, createTextVNode as _createTextVNode } from \\"vue\\"; -_withDirectives(_createVNode(\\"div\\", null, [_createTextVNode(\\"vShow\\")], 512), [[_vShow, x]]);" +"import { withDirectives as _withDirectives, createVNode as _createVNode, vShow as _vShow, createTextVNode as _createTextVNode } from "vue"; +_withDirectives(_createVNode("div", null, [_createTextVNode("vShow")], 512), [[_vShow, x]]);" `; exports[`vHtml > vHtml 1`] = ` -"import { createVNode as _createVNode } from \\"vue\\"; -_createVNode(\\"h1\\", { - \\"innerHTML\\": \\"