@vue-macros/common
Advanced tools
+4
-4
@@ -71,4 +71,4 @@ import { babelParse, getLang, isFunctionType, isLiteralType, resolveObjectKey, resolveString } from "ast-kit"; | ||
| s.appendLeft(offset, `\nimport ${imported === "default" ? HELPER_PREFIX + local : `{ ${imported} as ${HELPER_PREFIX + local} }`} from ${JSON.stringify(from)};`); | ||
| if (!importedMap.has(s)) importedMap.set(s, new Set([cacheKey])); | ||
| else importedMap.get(s).add(cacheKey); | ||
| if (importedMap.has(s)) importedMap.get(s).add(cacheKey); | ||
| else importedMap.set(s, new Set([cacheKey])); | ||
| } | ||
@@ -158,5 +158,5 @@ return `${HELPER_PREFIX}${local}`; | ||
| } | ||
| const VUE_PLUGINS = ["vite:vue", "unplugin-vue"]; | ||
| const VUE_PLUGINS = new Set(["vite:vue", "unplugin-vue"]); | ||
| function getVuePluginApi(plugins) { | ||
| const vuePlugin = (plugins || []).find((p) => VUE_PLUGINS.includes(p.name)); | ||
| const vuePlugin = (plugins || []).find((p) => VUE_PLUGINS.has(p.name)); | ||
| if (!vuePlugin) throw new Error("Cannot find Vue plugin (@vitejs/plugin-vue or unplugin-vue). Please make sure to add it before using Vue Macros."); | ||
@@ -163,0 +163,0 @@ const api = vuePlugin.api; |
+2
-2
| { | ||
| "name": "@vue-macros/common", | ||
| "version": "3.1.0", | ||
| "version": "3.1.1", | ||
| "description": "common feature from Vue Macros.", | ||
@@ -49,3 +49,3 @@ "type": "module", | ||
| "dependencies": { | ||
| "@vue/compiler-sfc": "^3.5.21", | ||
| "@vue/compiler-sfc": "^3.5.22", | ||
| "ast-kit": "^2.1.2", | ||
@@ -52,0 +52,0 @@ "local-pkg": "^1.1.2", |
19327
0.02%Updated