|
- import {
- transformExportProps
- } from "./chunk-MBDL57TK.mjs";
-
- // src/index.ts
- import { createUnplugin } from "unplugin";
- import {
- REGEX_SETUP_SFC,
- REGEX_VUE_SFC,
- REGEX_VUE_SUB,
- createFilter,
- detectVueVersion
- } from "@vue-macros/common";
- function resolveOption(options, framework) {
- const version = options.version || detectVueVersion();
- return {
- include: [REGEX_VUE_SFC, REGEX_SETUP_SFC].concat(
- version === 2 && framework === "webpack" ? REGEX_VUE_SUB : []
- ),
- ...options,
- version
- };
- }
- var name = "unplugin-vue-export-props";
- var src_default = createUnplugin(
- (userOptions = {}, { framework }) => {
- const options = resolveOption(userOptions, framework);
- const filter = createFilter(options);
- return {
- name,
- enforce: "pre",
- transformInclude(id) {
- return filter(id);
- },
- transform(code, id) {
- return transformExportProps(code, id);
- }
- };
- }
- );
-
- export {
- src_default
- };
|