@sdata/web-vue-auto-import-resolver 3.23.0 → 3.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -45,12 +45,12 @@ const getComponentExportSet = () => {
|
|
|
45
45
|
if (!clause || !modulePath) continue;
|
|
46
46
|
parseImportClause(clause, modulePath, importPathMap);
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
if (!
|
|
48
|
+
const lastExportBlock = [...source.matchAll(/export\s*\{([\s\S]*?)\}\s*;?/g)].at(-1);
|
|
49
|
+
if (!lastExportBlock?.[1]) {
|
|
50
50
|
cachedComponentSet = /* @__PURE__ */ new Set();
|
|
51
51
|
return cachedComponentSet;
|
|
52
52
|
}
|
|
53
|
-
const exportSpecifiers =
|
|
53
|
+
const exportSpecifiers = lastExportBlock[1].split(",").map((item) => item.trim()).filter(Boolean);
|
|
54
54
|
const componentSet = /* @__PURE__ */ new Set();
|
|
55
55
|
for (const exportSpecifier of exportSpecifiers) {
|
|
56
56
|
const [localName, exportedName] = exportSpecifier.split(/\s+as\s+/i).map((item) => item.trim());
|
package/package.json
CHANGED