@absolutejs/absolute 0.20.0-beta.124 → 0.20.0-beta.125

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/dist/index.js CHANGED
@@ -23455,10 +23455,14 @@ var resolveDevClientDir3 = () => {
23455
23455
  return "template-only";
23456
23456
  }
23457
23457
  return "full";
23458
- }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative18(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => {
23459
- const staticImports = Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g));
23460
- const dynamicImports = Array.from(sourceCode.matchAll(/\bimport\s*\(\s*['"]([^'"]+)['"]\s*\)/g));
23461
- return Array.from(new Set([...staticImports, ...dynamicImports].map((match) => match[1]).filter((importPath) => importPath !== undefined)));
23458
+ }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative18(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), importScanner, IMPORT_PATTERNS, matchImports = (sourceCode) => IMPORT_PATTERNS.flatMap((pattern) => Array.from(sourceCode.matchAll(pattern), (match) => match[1])).filter((importPath) => importPath !== undefined), extractImports = (sourceCode) => {
23459
+ let found;
23460
+ try {
23461
+ found = importScanner.scanImports(sourceCode).map(({ path: path2 }) => path2);
23462
+ } catch {
23463
+ found = matchImports(sourceCode);
23464
+ }
23465
+ return Array.from(new Set(found));
23462
23466
  }, resolveHelperTsPath = (sourceDir, helper) => {
23463
23467
  if (helper.endsWith(".ts"))
23464
23468
  return resolve34(sourceDir, helper);
@@ -24033,6 +24037,12 @@ var init_compileVue = __esm(() => {
24033
24037
  persistentBuildCache = new Map;
24034
24038
  vueSourceHashCache = new Map;
24035
24039
  vueHmrMetadata = new Map;
24040
+ importScanner = new Bun.Transpiler({ loader: "ts" });
24041
+ IMPORT_PATTERNS = [
24042
+ /import\s+[\s\S]+?['"]([^'"]+)['"]/g,
24043
+ /\bimport\s*\(\s*['"]([^'"]+)['"]\s*\)/g,
24044
+ /\bexport\s+(?:type\s+)?(?:\*(?:\s+as\s+[\w$]+)?|\{[^}]*\})\s*from\s*['"]([^'"]+)['"]/g
24045
+ ];
24036
24046
  EXTERNAL_STYLE_DEPENDENCY = /@(?:import|use|forward)\b/;
24037
24047
  fingerprintCache2 = new Map;
24038
24048
  pendingWrites = new Set;
@@ -45791,5 +45801,5 @@ export {
45791
45801
  wrapPageHandlerWithStreamingSlots
45792
45802
  };
45793
45803
 
45794
- //# debugId=53D864DB191F7D8364756E2164756E21
45804
+ //# debugId=105F7E3CA690A8B864756E2164756E21
45795
45805
  //# sourceMappingURL=index.js.map