vue-jsx-vapor
Version:
Convert Vue JSX to Vapor
17 lines (15 loc) • 616 B
JavaScript
import jsxMacros from "@vue-jsx-vapor/macros/volar";
import jsxDirective from "@vue-macros/volar/jsx-directive";
import jsxRef from "@vue-macros/volar/jsx-ref";
import { createPlugin } from "ts-macro";
//#region src/volar.ts
const plugin = createPlugin((ctx, options) => {
return [
jsxDirective()(ctx),
options?.ref === false ? [] : jsxRef(options?.ref === true ? void 0 : options?.ref)(ctx),
options?.macros === false ? [] : options?.macros ? jsxMacros(options.macros === true ? void 0 : options.macros)(ctx) : []
].flat();
});
var volar_default = plugin;
//#endregion
export { volar_default as default };