@absolutejs/absolute 0.19.0-beta.1055 → 0.19.0-beta.1057

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/vue/index.js CHANGED
@@ -1115,7 +1115,7 @@ var init_telemetry = __esm(() => {
1115
1115
  // src/cli/telemetryEvent.ts
1116
1116
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
1117
1117
  import { arch, platform } from "os";
1118
- import { dirname, join as join2, parse } from "path";
1118
+ import { dirname as dirname2, join as join2, parse } from "path";
1119
1119
  var checkCandidate = (candidate) => {
1120
1120
  if (!existsSync2(candidate)) {
1121
1121
  return null;
@@ -1140,7 +1140,7 @@ var checkCandidate = (candidate) => {
1140
1140
  if (version) {
1141
1141
  return version;
1142
1142
  }
1143
- dir = dirname(dir);
1143
+ dir = dirname2(dir);
1144
1144
  }
1145
1145
  return "unknown";
1146
1146
  }, sendTelemetryEvent = (event, payload) => {
@@ -1179,18 +1179,18 @@ __export(exports_buildHMRClient, {
1179
1179
  buildHMRClient: () => buildHMRClient
1180
1180
  });
1181
1181
  import { existsSync as existsSync3 } from "fs";
1182
- import { resolve } from "path";
1182
+ import { resolve as resolve2 } from "path";
1183
1183
  var {build: bunBuild } = globalThis.Bun;
1184
1184
  var resolveHmrClientPath = () => {
1185
1185
  const projectRoot = process.cwd();
1186
- const fromSource = resolve(import.meta.dir, "client/hmrClient.ts");
1186
+ const fromSource = resolve2(import.meta.dir, "client/hmrClient.ts");
1187
1187
  if (existsSync3(fromSource) && fromSource.startsWith(projectRoot)) {
1188
1188
  return fromSource;
1189
1189
  }
1190
- const fromNodeModules = resolve(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client/hmrClient.ts");
1190
+ const fromNodeModules = resolve2(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client/hmrClient.ts");
1191
1191
  if (existsSync3(fromNodeModules))
1192
1192
  return fromNodeModules;
1193
- return resolve(import.meta.dir, "dev/client/hmrClient.ts");
1193
+ return resolve2(import.meta.dir, "dev/client/hmrClient.ts");
1194
1194
  }, hmrClientPath, buildHMRClient = async () => {
1195
1195
  const entryPoint = hmrClientPath;
1196
1196
  const result = await bunBuild({
@@ -1294,13 +1294,13 @@ var requireCurrentIslandRegistry = () => {
1294
1294
 
1295
1295
  // src/angular/resolveAngularPackage.ts
1296
1296
  import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
1297
- import { join as join3, resolve as resolve2 } from "path";
1297
+ import { join as join3, resolve as resolve3 } from "path";
1298
1298
  var resolveAngularPackageDir = (specifier) => {
1299
- const fromCompiledRuntime = process.env.ABSOLUTE_BUILD_DIR ? resolve2(process.env.ABSOLUTE_BUILD_DIR, "node_modules", specifier) : null;
1299
+ const fromCompiledRuntime = process.env.ABSOLUTE_BUILD_DIR ? resolve3(process.env.ABSOLUTE_BUILD_DIR, "node_modules", specifier) : null;
1300
1300
  if (fromCompiledRuntime && existsSync4(fromCompiledRuntime)) {
1301
1301
  return fromCompiledRuntime;
1302
1302
  }
1303
- const fromProject = resolve2(process.cwd(), "node_modules", specifier);
1303
+ const fromProject = resolve3(process.cwd(), "node_modules", specifier);
1304
1304
  if (existsSync4(fromProject)) {
1305
1305
  return fromProject;
1306
1306
  }
@@ -1322,7 +1322,7 @@ var resolveAngularPackageDir = (specifier) => {
1322
1322
  }, toSafeVendorName = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_"), resolveAngularRuntimePath = (specifier) => {
1323
1323
  const buildDirs = [
1324
1324
  process.env.ABSOLUTE_BUILD_DIR,
1325
- resolve2(process.cwd(), "build")
1325
+ resolve3(process.cwd(), "build")
1326
1326
  ].filter((value) => Boolean(value));
1327
1327
  for (const buildDir of buildDirs) {
1328
1328
  const vendorPath = join3(buildDir, "angular", "vendor", "server", `${toSafeVendorName(specifier)}.js`);
@@ -1905,7 +1905,7 @@ var init_islandSsr = __esm(() => {
1905
1905
  // src/build/nativeRewrite.ts
1906
1906
  import { dlopen, FFIType, ptr } from "bun:ffi";
1907
1907
  import { platform as platform2, arch as arch2 } from "os";
1908
- import { resolve as resolve3 } from "path";
1908
+ import { resolve as resolve4 } from "path";
1909
1909
  var ffiDefinition, nativeLib = null, loadNative = () => {
1910
1910
  if (nativeLib !== null)
1911
1911
  return nativeLib;
@@ -1923,7 +1923,7 @@ var ffiDefinition, nativeLib = null, loadNative = () => {
1923
1923
  if (!libPath)
1924
1924
  return null;
1925
1925
  try {
1926
- const fullPath = resolve3(import.meta.dir, "../../native/packages", libPath);
1926
+ const fullPath = resolve4(import.meta.dir, "../../native/packages", libPath);
1927
1927
  const lib = dlopen(fullPath, ffiDefinition);
1928
1928
  nativeLib = lib.symbols;
1929
1929
  return nativeLib;
@@ -2144,7 +2144,7 @@ var init_rewriteImportsPlugin = __esm(() => {
2144
2144
 
2145
2145
  // src/core/angularServerModule.ts
2146
2146
  import { mkdir } from "fs/promises";
2147
- import { dirname as dirname3, join as join5, relative } from "path";
2147
+ import { dirname as dirname4, join as join5, relative } from "path";
2148
2148
  var serverCacheRoot, compiledModuleCache, ANGULAR_SPECIFIER_RE, getCachedModulePath = (sourcePath) => {
2149
2149
  const relativeSourcePath = relative(process.cwd(), sourcePath).replace(/\\/g, "/");
2150
2150
  const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
@@ -2182,7 +2182,7 @@ ${message}`);
2182
2182
  const code = await entry.text();
2183
2183
  const rewritten = rewriteImportsInContent(code, collectVendorPaths(code));
2184
2184
  const modulePath = getCachedModulePath(sourcePath);
2185
- await mkdir(dirname3(modulePath), { recursive: true });
2185
+ await mkdir(dirname4(modulePath), { recursive: true });
2186
2186
  await Bun.write(modulePath, rewritten);
2187
2187
  return modulePath;
2188
2188
  }, compileAngularServerModule = (sourcePath) => {
@@ -2203,7 +2203,7 @@ var init_angularServerModule = __esm(() => {
2203
2203
  });
2204
2204
 
2205
2205
  // src/build/resolvePackageImport.ts
2206
- import { resolve as resolve4, join as join6 } from "path";
2206
+ import { resolve as resolve5, join as join6 } from "path";
2207
2207
  import { existsSync as existsSync5, readFileSync as readFileSync4 } from "fs";
2208
2208
  var resolveExportPath = (entry, conditions) => {
2209
2209
  if (typeof entry === "string")
@@ -2225,10 +2225,10 @@ var resolveExportPath = (entry, conditions) => {
2225
2225
  const packageName = isScoped ? `${parts[0]}/${parts[1]}` : parts[0];
2226
2226
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
2227
2227
  const exportKey = subpath ? `./${subpath}` : ".";
2228
- const currentPackageJsonPath = resolve4(process.cwd(), "package.json");
2228
+ const currentPackageJsonPath = resolve5(process.cwd(), "package.json");
2229
2229
  const currentPackageJson = existsSync5(currentPackageJsonPath) ? JSON.parse(readFileSync4(currentPackageJsonPath, "utf-8")) : null;
2230
2230
  const currentPackageDir = currentPackageJson?.name === packageName ? process.cwd() : null;
2231
- const packageDir = currentPackageDir ?? resolve4(process.cwd(), "node_modules", packageName ?? "");
2231
+ const packageDir = currentPackageDir ?? resolve5(process.cwd(), "node_modules", packageName ?? "");
2232
2232
  const packageJsonPath = join6(packageDir, "package.json");
2233
2233
  if (!existsSync5(packageJsonPath))
2234
2234
  return null;
@@ -2244,12 +2244,12 @@ var resolveExportPath = (entry, conditions) => {
2244
2244
  if (!importPath)
2245
2245
  return null;
2246
2246
  if (currentPackageDir && importPath.startsWith("./dist/")) {
2247
- const sourceCandidate = resolve4(packageDir, importPath.replace(/^\.\/dist\//, "./src/"));
2247
+ const sourceCandidate = resolve5(packageDir, importPath.replace(/^\.\/dist\//, "./src/"));
2248
2248
  if (existsSync5(sourceCandidate)) {
2249
2249
  return sourceCandidate;
2250
2250
  }
2251
2251
  }
2252
- const resolved = resolve4(packageDir, importPath);
2252
+ const resolved = resolve5(packageDir, importPath);
2253
2253
  return existsSync5(resolved) ? resolved : null;
2254
2254
  } catch {
2255
2255
  return null;
@@ -2406,12 +2406,12 @@ import { existsSync as existsSync6, readFileSync as readFileSync5 } from "fs";
2406
2406
  import { readFile as readFile2 } from "fs/promises";
2407
2407
  import { createRequire } from "module";
2408
2408
  import {
2409
- dirname as dirname4,
2409
+ dirname as dirname5,
2410
2410
  extname,
2411
- isAbsolute,
2411
+ isAbsolute as isAbsolute2,
2412
2412
  join as join7,
2413
2413
  relative as relative2,
2414
- resolve as resolve5
2414
+ resolve as resolve6
2415
2415
  } from "path";
2416
2416
  import { fileURLToPath, pathToFileURL } from "url";
2417
2417
  var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTERN, STYLE_LANGUAGE_PATTERN, importOptionalPeer, requireOptionalPeer, requireFromCwd, isPreprocessableStylePath = (filePath) => STYLE_EXTENSION_PATTERN.test(filePath), isStyleModulePath = (filePath) => STYLE_MODULE_EXTENSION_PATTERN.test(filePath), isStylePath = (filePath) => /\.(css|s[ac]ss|less|styl(?:us)?)$/i.test(filePath), getStyleBaseName = (filePath) => filePath.replace(/\.(css|s[ac]ss|less|styl(?:us)?)$/i, ""), getStyleLanguage = (filePathOrLanguage) => {
@@ -2447,9 +2447,9 @@ ${message}`);
2447
2447
  return requireOptionalPeer(specifier);
2448
2448
  }
2449
2449
  }, normalizeLoadPaths = (filePath, paths = []) => [
2450
- dirname4(filePath),
2450
+ dirname5(filePath),
2451
2451
  process.cwd(),
2452
- ...paths.map((path) => resolve5(process.cwd(), path))
2452
+ ...paths.map((path) => resolve6(process.cwd(), path))
2453
2453
  ], tsconfigAliasCache, stripJsonComments = (source) => source.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^:])\/\/.*$/gm, "$1"), normalizeAliasEntries = (aliases) => Object.entries(aliases ?? {}).map(([pattern, value]) => ({
2454
2454
  pattern,
2455
2455
  replacements: Array.isArray(value) ? value : [value]
@@ -2457,7 +2457,7 @@ ${message}`);
2457
2457
  const cwd = process.cwd();
2458
2458
  if (tsconfigAliasCache?.cwd === cwd)
2459
2459
  return tsconfigAliasCache;
2460
- const tsconfigPath = resolve5(cwd, "tsconfig.json");
2460
+ const tsconfigPath = resolve6(cwd, "tsconfig.json");
2461
2461
  const empty = { aliases: [], baseUrl: cwd, cwd };
2462
2462
  if (!existsSync6(tsconfigPath)) {
2463
2463
  tsconfigAliasCache = empty;
@@ -2466,7 +2466,7 @@ ${message}`);
2466
2466
  try {
2467
2467
  const parsed = JSON.parse(stripJsonComments(readFileSync5(tsconfigPath, "utf-8")));
2468
2468
  const compilerOptions = parsed.compilerOptions ?? {};
2469
- const baseUrl = resolve5(cwd, compilerOptions.baseUrl ?? ".");
2469
+ const baseUrl = resolve6(cwd, compilerOptions.baseUrl ?? ".");
2470
2470
  tsconfigAliasCache = {
2471
2471
  aliases: normalizeAliasEntries(compilerOptions.paths),
2472
2472
  baseUrl,
@@ -2494,7 +2494,7 @@ ${message}`);
2494
2494
  continue;
2495
2495
  const wildcard = match[1] ?? "";
2496
2496
  for (const replacement of alias.replacements) {
2497
- targets.push(resolve5(baseUrl, replacement.replace("*", wildcard)));
2497
+ targets.push(resolve6(baseUrl, replacement.replace("*", wildcard)));
2498
2498
  }
2499
2499
  }
2500
2500
  return targets;
@@ -2512,7 +2512,7 @@ ${message}`);
2512
2512
  ]);
2513
2513
  if (language === "scss" || language === "sass") {
2514
2514
  return paths.flatMap((path) => {
2515
- const dir = dirname4(path);
2515
+ const dir = dirname5(path);
2516
2516
  const base = path.slice(dir.length + 1);
2517
2517
  return [path, join7(dir, `_${base}`)];
2518
2518
  });
@@ -2521,8 +2521,8 @@ ${message}`);
2521
2521
  }, resolveImportPath = (specifier, fromDirectory, loadPaths, language, config) => {
2522
2522
  const rawCandidates = [
2523
2523
  ...resolveAliasTargets(specifier, config),
2524
- isAbsolute(specifier) ? specifier : resolve5(fromDirectory, specifier),
2525
- ...loadPaths.map((path) => resolve5(path, specifier))
2524
+ isAbsolute2(specifier) ? specifier : resolve6(fromDirectory, specifier),
2525
+ ...loadPaths.map((path) => resolve6(path, specifier))
2526
2526
  ];
2527
2527
  for (const candidate of rawCandidates.flatMap((path) => getCandidatePaths(path, language))) {
2528
2528
  if (existsSync6(candidate))
@@ -2538,8 +2538,8 @@ ${message}`);
2538
2538
  path: url.slice(0, markerIndex)
2539
2539
  };
2540
2540
  }, rebaseCssUrls = (contents, sourceFile, entryFile) => {
2541
- const sourceDir = dirname4(sourceFile);
2542
- const entryDir = dirname4(entryFile);
2541
+ const sourceDir = dirname5(sourceFile);
2542
+ const entryDir = dirname5(entryFile);
2543
2543
  if (sourceDir === entryDir)
2544
2544
  return contents;
2545
2545
  return contents.replace(/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi, (match, quote, rawUrl) => {
@@ -2547,15 +2547,15 @@ ${message}`);
2547
2547
  if (!trimmedUrl || isExternalCssUrl(trimmedUrl))
2548
2548
  return match;
2549
2549
  const { marker, path } = splitCssUrl(trimmedUrl);
2550
- const rebased = relative2(entryDir, resolve5(sourceDir, path)).replace(/\\/g, "/");
2550
+ const rebased = relative2(entryDir, resolve6(sourceDir, path)).replace(/\\/g, "/");
2551
2551
  const normalized = rebased.startsWith(".") ? rebased : `./${rebased}`;
2552
2552
  const nextQuote = quote || '"';
2553
2553
  return `url(${nextQuote}${normalized}${marker}${nextQuote})`;
2554
2554
  });
2555
2555
  }, rewriteAliasedStyleImports = (contents, sourceFile, loadPaths, language, config) => contents.replace(/(@(?:use|forward|import|require)\s+)(["'])([^"']+)\2/g, (match, prefix, quote, specifier) => {
2556
- if (specifier.startsWith(".") || isAbsolute(specifier) || isExternalCssUrl(specifier))
2556
+ if (specifier.startsWith(".") || isAbsolute2(specifier) || isExternalCssUrl(specifier))
2557
2557
  return match;
2558
- const resolved = resolveImportPath(specifier, dirname4(sourceFile), loadPaths, language, config);
2558
+ const resolved = resolveImportPath(specifier, dirname5(sourceFile), loadPaths, language, config);
2559
2559
  return resolved ? `${prefix}${quote}${resolved}${quote}` : match;
2560
2560
  }), preprocessLoadedStyle = (contents, sourceFile, entryFile, loadPaths = [], language, config) => {
2561
2561
  const rebased = rebaseCssUrls(contents, sourceFile, entryFile);
@@ -2585,7 +2585,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2585
2585
  }
2586
2586
  return mod;
2587
2587
  }, loadPostcssConfigFile = async (configPath2) => {
2588
- const resolved = resolve5(process.cwd(), configPath2);
2588
+ const resolved = resolve6(process.cwd(), configPath2);
2589
2589
  const loaded = resolved.endsWith(".cjs") || resolved.endsWith(".cts") ? requireOptionalPeerSync(resolved) : await importOptionalPeer(`${new URL(`file://${resolved}`).href}?t=${Date.now()}`);
2590
2590
  const config = normalizePostcssModule(loaded);
2591
2591
  const value = typeof config === "function" ? await config({
@@ -2645,9 +2645,9 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2645
2645
  return result.css;
2646
2646
  }, createSassImporter = (entryFile, loadPaths, language, config, deps) => ({
2647
2647
  canonicalize(specifier, options) {
2648
- const fromDirectory = options.containingUrl ? dirname4(fileURLToPath(options.containingUrl)) : dirname4(entryFile);
2648
+ const fromDirectory = options.containingUrl ? dirname5(fileURLToPath(options.containingUrl)) : dirname5(entryFile);
2649
2649
  const resolved = resolveImportPath(specifier, fromDirectory, loadPaths, language, config);
2650
- return resolved ? new URL(pathToFileURL(resolve5(resolved)).href) : null;
2650
+ return resolved ? new URL(pathToFileURL(resolve6(resolved)).href) : null;
2651
2651
  },
2652
2652
  load(canonicalUrl) {
2653
2653
  const filePath = fileURLToPath(canonicalUrl);
@@ -2664,9 +2664,9 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2664
2664
  install(less, pluginManager) {
2665
2665
  const baseManager = new less.FileManager;
2666
2666
  const manager = Object.create(baseManager);
2667
- manager.supports = (filename, currentDirectory) => Boolean(resolveImportPath(filename, resolve5(currentDirectory), loadPaths, "less", config));
2667
+ manager.supports = (filename, currentDirectory) => Boolean(resolveImportPath(filename, resolve6(currentDirectory), loadPaths, "less", config));
2668
2668
  manager.loadFile = async (filename, currentDirectory) => {
2669
- const resolved = resolveImportPath(filename, resolve5(currentDirectory), loadPaths, "less", config);
2669
+ const resolved = resolveImportPath(filename, resolve6(currentDirectory), loadPaths, "less", config);
2670
2670
  if (!resolved) {
2671
2671
  throw new Error(`Unable to resolve Less import "${filename}"`);
2672
2672
  }
@@ -2703,29 +2703,29 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2703
2703
  const stylusDeps = renderer.deps?.();
2704
2704
  if (Array.isArray(stylusDeps)) {
2705
2705
  for (const dep of stylusDeps)
2706
- deps.add(resolve5(dep));
2706
+ deps.add(resolve6(dep));
2707
2707
  }
2708
2708
  }
2709
2709
  resolveCss(css ?? "");
2710
2710
  });
2711
2711
  });
2712
2712
  }, styleDependencyGraph, styleOutputHashes, recordStyleDeps = (entry, deps) => {
2713
- const key = resolve5(entry);
2713
+ const key = resolve6(entry);
2714
2714
  const stripped = new Set;
2715
2715
  for (const dep of deps) {
2716
- const resolved = resolve5(dep);
2716
+ const resolved = resolve6(dep);
2717
2717
  if (resolved !== key)
2718
2718
  stripped.add(resolved);
2719
2719
  }
2720
2720
  styleDependencyGraph.set(key, stripped);
2721
2721
  }, addStyleImporter = (importerPath, stylePath) => {
2722
- const key = resolve5(importerPath);
2723
- const target = resolve5(stylePath);
2722
+ const key = resolve6(importerPath);
2723
+ const target = resolve6(stylePath);
2724
2724
  const deps = styleDependencyGraph.get(key) ?? new Set;
2725
2725
  deps.add(target);
2726
2726
  styleDependencyGraph.set(key, deps);
2727
2727
  }, findStyleEntriesImporting = (changedPath) => {
2728
- const target = resolve5(changedPath);
2728
+ const target = resolve6(changedPath);
2729
2729
  const importers = [];
2730
2730
  for (const [entry, deps] of styleDependencyGraph) {
2731
2731
  if (deps.has(target))
@@ -2733,13 +2733,13 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2733
2733
  }
2734
2734
  return importers;
2735
2735
  }, recordStyleOutput = (entry, css) => {
2736
- const key = resolve5(entry);
2736
+ const key = resolve6(entry);
2737
2737
  const hash = createHash("sha1").update(css).digest("hex");
2738
2738
  const previous = styleOutputHashes.get(key);
2739
2739
  styleOutputHashes.set(key, hash);
2740
2740
  return previous !== hash;
2741
2741
  }, forgetStyleEntry = (entry) => {
2742
- const key = resolve5(entry);
2742
+ const key = resolve6(entry);
2743
2743
  styleDependencyGraph.delete(key);
2744
2744
  styleOutputHashes.delete(key);
2745
2745
  }, compileStyleSource = async (filePath, source, languageHint, config) => {
@@ -2765,7 +2765,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2765
2765
  loadPaths,
2766
2766
  style: "expanded",
2767
2767
  syntax: language === "sass" ? "indented" : "scss",
2768
- url: new URL(pathToFileURL(resolve5(filePath)).href)
2768
+ url: new URL(pathToFileURL(resolve6(filePath)).href)
2769
2769
  });
2770
2770
  const css = await runPostcss(result.css, filePath, config);
2771
2771
  const loadedUrls = result.loadedUrls ?? [];
@@ -2773,7 +2773,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2773
2773
  if (url.protocol !== "file:")
2774
2774
  continue;
2775
2775
  const dep = fileURLToPath(url);
2776
- if (resolve5(dep) === resolve5(filePath))
2776
+ if (resolve6(dep) === resolve6(filePath))
2777
2777
  continue;
2778
2778
  deps.add(dep);
2779
2779
  }
@@ -2894,7 +2894,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2894
2894
  const start = match.index ?? 0;
2895
2895
  const end = start + match[0].length;
2896
2896
  parts.push(content.slice(cursor, start));
2897
- const fullPath = isAbsolute(importPath) ? importPath : resolve5(baseDir, importPath);
2897
+ const fullPath = isAbsolute2(importPath) ? importPath : resolve6(baseDir, importPath);
2898
2898
  if (visited.has(fullPath) || !existsSync6(fullPath)) {
2899
2899
  parts.push(visited.has(fullPath) ? "" : match[0]);
2900
2900
  cursor = end;
@@ -2903,7 +2903,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2903
2903
  const nextVisited = new Set(visited);
2904
2904
  nextVisited.add(fullPath);
2905
2905
  const imported = await readFile2(fullPath, "utf-8");
2906
- parts.push(await resolveCssImportsAsync(imported, dirname4(fullPath), nextVisited));
2906
+ parts.push(await resolveCssImportsAsync(imported, dirname5(fullPath), nextVisited));
2907
2907
  cursor = end;
2908
2908
  }
2909
2909
  parts.push(content.slice(cursor));
@@ -2912,13 +2912,13 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2912
2912
  if (!isPreprocessableStylePath(filePath)) {
2913
2913
  const raw = await readFile2(filePath, "utf-8");
2914
2914
  const processed = await runPostcss(raw, filePath, config);
2915
- return resolveCssImportsAsync(processed, dirname4(filePath), new Set([filePath]));
2915
+ return resolveCssImportsAsync(processed, dirname5(filePath), new Set([filePath]));
2916
2916
  }
2917
2917
  const compiled = await compileStyleSource(filePath, undefined, undefined, config);
2918
- return resolveCssImportsAsync(compiled, dirname4(filePath), new Set([filePath]));
2918
+ return resolveCssImportsAsync(compiled, dirname5(filePath), new Set([filePath]));
2919
2919
  }, resolveCssImportsSync = (content, baseDir, visited) => {
2920
2920
  return content.replace(CSS_IMPORT_PATTERN, (match, importPath) => {
2921
- const fullPath = isAbsolute(importPath) ? importPath : resolve5(baseDir, importPath);
2921
+ const fullPath = isAbsolute2(importPath) ? importPath : resolve6(baseDir, importPath);
2922
2922
  if (visited.has(fullPath))
2923
2923
  return "";
2924
2924
  if (!existsSync6(fullPath))
@@ -2926,7 +2926,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2926
2926
  const nextVisited = new Set(visited);
2927
2927
  nextVisited.add(fullPath);
2928
2928
  const imported = readFileSync5(fullPath, "utf-8");
2929
- return resolveCssImportsSync(imported, dirname4(fullPath), nextVisited);
2929
+ return resolveCssImportsSync(imported, dirname5(fullPath), nextVisited);
2930
2930
  });
2931
2931
  }, compileStyleFileIfNeededSync = (filePath, config) => {
2932
2932
  const rawContents = readFileSync5(filePath, "utf-8");
@@ -2952,18 +2952,18 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2952
2952
  loadPaths,
2953
2953
  style: "expanded",
2954
2954
  syntax: language === "sass" ? "indented" : "scss",
2955
- url: new URL(pathToFileURL(resolve5(filePath)).href)
2955
+ url: new URL(pathToFileURL(resolve6(filePath)).href)
2956
2956
  });
2957
2957
  const loadedUrls = result.loadedUrls ?? [];
2958
2958
  for (const url of loadedUrls) {
2959
2959
  if (url.protocol !== "file:")
2960
2960
  continue;
2961
2961
  const dep = fileURLToPath(url);
2962
- if (resolve5(dep) === resolve5(filePath))
2962
+ if (resolve6(dep) === resolve6(filePath))
2963
2963
  continue;
2964
2964
  addStyleImporter(filePath, dep);
2965
2965
  }
2966
- return resolveCssImportsSync(result.css, dirname4(filePath), new Set([filePath]));
2966
+ return resolveCssImportsSync(result.css, dirname5(filePath), new Set([filePath]));
2967
2967
  }
2968
2968
  if (language === "less") {
2969
2969
  throw new Error(`Unable to compile ${filePath}: Less styleUrl preprocessing is async-only. Import the Less file from a bundled entrypoint or use SCSS/CSS for Angular styleUrl.`);
@@ -2971,7 +2971,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2971
2971
  if (language === "stylus") {
2972
2972
  throw new Error(`Unable to compile ${filePath}: Stylus styleUrl preprocessing is async-only. Import the Stylus file from a bundled entrypoint or use SCSS/CSS for Angular styleUrl.`);
2973
2973
  }
2974
- return resolveCssImportsSync(rawContents, dirname4(filePath), new Set([filePath]));
2974
+ return resolveCssImportsSync(rawContents, dirname5(filePath), new Set([filePath]));
2975
2975
  }, getCssOutputExtension = (filePath) => isPreprocessableStylePath(filePath) ? ".css" : extname(filePath);
2976
2976
  var init_stylePreprocessor = __esm(() => {
2977
2977
  CSS_EXTENSION_PATTERN = /\.css$/i;
@@ -2989,9 +2989,9 @@ var init_stylePreprocessor = __esm(() => {
2989
2989
 
2990
2990
  // src/core/svelteServerModule.ts
2991
2991
  import { mkdir as mkdir2, readdir as readdir3 } from "fs/promises";
2992
- import { basename as basename3, dirname as dirname5, extname as extname2, join as join8, relative as relative3, resolve as resolve6 } from "path";
2992
+ import { basename as basename3, dirname as dirname6, extname as extname2, join as join8, relative as relative3, resolve as resolve7 } from "path";
2993
2993
  var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
2994
- const importPath = relative3(dirname5(from), target).replace(/\\/g, "/");
2994
+ const importPath = relative3(dirname6(from), target).replace(/\\/g, "/");
2995
2995
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
2996
2996
  }, processDirectoryEntries = (entries, dir, targetFileName, stack) => {
2997
2997
  for (const entry of entries) {
@@ -3037,7 +3037,7 @@ var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, transpiler,
3037
3037
  if (!spec.startsWith(".")) {
3038
3038
  return null;
3039
3039
  }
3040
- const basePath = resolve6(dirname5(from), spec);
3040
+ const basePath = resolve7(dirname6(from), spec);
3041
3041
  const candidates = [
3042
3042
  basePath,
3043
3043
  `${basePath}.ts`,
@@ -3069,7 +3069,7 @@ var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, transpiler,
3069
3069
  if (!spec.startsWith(".")) {
3070
3070
  return null;
3071
3071
  }
3072
- const explicitPath = resolve6(dirname5(from), spec);
3072
+ const explicitPath = resolve7(dirname6(from), spec);
3073
3073
  if (extname2(explicitPath) === ".svelte") {
3074
3074
  return explicitPath;
3075
3075
  }
@@ -3148,7 +3148,7 @@ var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, transpiler,
3148
3148
  compiledCode = compiledCode.replaceAll(spec, resolvedModuleImport);
3149
3149
  }
3150
3150
  const compiledModulePath = getCachedModulePath2(sourcePath);
3151
- await mkdir2(dirname5(compiledModulePath), { recursive: true });
3151
+ await mkdir2(dirname6(compiledModulePath), { recursive: true });
3152
3152
  await writeIfChanged(compiledModulePath, compiledCode);
3153
3153
  compiledModuleCache2.set(sourcePath, compiledModulePath);
3154
3154
  return compiledModulePath;
@@ -3170,10 +3170,10 @@ var init_svelteServerModule = __esm(() => {
3170
3170
  // src/core/vueServerModule.ts
3171
3171
  import { existsSync as existsSync7, readFileSync as readFileSync6, realpathSync } from "fs";
3172
3172
  import { mkdir as mkdir3 } from "fs/promises";
3173
- import { dirname as dirname6, join as join9, relative as relative4, resolve as resolve7 } from "path";
3173
+ import { dirname as dirname7, join as join9, relative as relative4, resolve as resolve8 } from "path";
3174
3174
  var {Transpiler } = globalThis.Bun;
3175
3175
  var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, transpiler2, ensureRelativeImportPath2 = (from, target) => {
3176
- const importPath = relative4(dirname6(from), target).replace(/\\/g, "/");
3176
+ const importPath = relative4(dirname7(from), target).replace(/\\/g, "/");
3177
3177
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
3178
3178
  }, getCachedModulePath3 = (sourcePath) => {
3179
3179
  const relativeSourcePath = relative4(process.cwd(), sourcePath).replace(/\\/g, "/");
@@ -3238,7 +3238,7 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
3238
3238
  }).code : "const ssrRender = () => {};";
3239
3239
  const childImportPaths = extractRelativeVueImports(compiledScript.content);
3240
3240
  const compiledChildren = await Promise.all(childImportPaths.map(async (relativeImport) => ({
3241
- compiledPath: await compileVueServerModule(resolve7(dirname6(sourcePath), relativeImport)),
3241
+ compiledPath: await compileVueServerModule(resolve8(dirname7(sourcePath), relativeImport)),
3242
3242
  spec: relativeImport
3243
3243
  })));
3244
3244
  const strippedScript = stripExports(compiledScript.content);
@@ -3255,7 +3255,7 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
3255
3255
  for (const child of compiledChildren) {
3256
3256
  rewritten = rewritten.replaceAll(child.spec, ensureRelativeImportPath2(compiledModulePath, child.compiledPath));
3257
3257
  }
3258
- await mkdir3(dirname6(compiledModulePath), { recursive: true });
3258
+ await mkdir3(dirname7(compiledModulePath), { recursive: true });
3259
3259
  await writeIfChanged2(compiledModulePath, rewritten);
3260
3260
  compiledModuleCache3.set(sourcePath, compiledModulePath);
3261
3261
  return compiledModulePath;
@@ -3948,7 +3948,7 @@ var registerStreamSlotForSsr = (props) => {
3948
3948
  // src/vue/pageHandler.ts
3949
3949
  init_constants();
3950
3950
  import { readdir } from "fs/promises";
3951
- import { basename as basename2, dirname as dirname2 } from "path";
3951
+ import { basename as basename2, dirname as dirname3 } from "path";
3952
3952
 
3953
3953
  // src/utils/inlinePageCss.ts
3954
3954
  var siblingCssCache = new Map;
@@ -3980,6 +3980,7 @@ var readSiblingCss = async (siblingJsPath) => {
3980
3980
 
3981
3981
  // src/utils/spaRouteCss.ts
3982
3982
  import { readFile } from "fs/promises";
3983
+ import { dirname, isAbsolute, resolve } from "path";
3983
3984
  var sideManifestCache = new Map;
3984
3985
  var readSideManifest = async (sideManifestPath) => {
3985
3986
  const cached = sideManifestCache.get(sideManifestPath);
@@ -4018,18 +4019,19 @@ var findMatchingRoute = (routes, pathname) => {
4018
4019
  return null;
4019
4020
  };
4020
4021
  var childCssCache = new Map;
4021
- var readChildCss = async (cssPath) => {
4022
+ var readChildCss = async (cssPath, sideManifestPath) => {
4022
4023
  if (!cssPath)
4023
4024
  return "";
4024
- const cached = childCssCache.get(cssPath);
4025
+ const resolvedCssPath = isAbsolute(cssPath) ? cssPath : resolve(dirname(sideManifestPath), cssPath);
4026
+ const cached = childCssCache.get(resolvedCssPath);
4025
4027
  if (cached !== undefined)
4026
4028
  return cached;
4027
4029
  try {
4028
- const css = await readFile(cssPath, "utf-8");
4029
- childCssCache.set(cssPath, css);
4030
+ const css = await readFile(resolvedCssPath, "utf-8");
4031
+ childCssCache.set(resolvedCssPath, css);
4030
4032
  return css;
4031
4033
  } catch {
4032
- childCssCache.set(cssPath, "");
4034
+ childCssCache.set(resolvedCssPath, "");
4033
4035
  return "";
4034
4036
  }
4035
4037
  };
@@ -4051,7 +4053,7 @@ var resolveSpaChildCss = async (siblingJsPath, requestUrl) => {
4051
4053
  const matched = findMatchingRoute(routes, pathname);
4052
4054
  if (!matched)
4053
4055
  return "";
4054
- return readChildCss(matched.cssPath);
4056
+ return readChildCss(matched.cssPath, sideManifestPath);
4055
4057
  };
4056
4058
 
4057
4059
  // src/core/islandPageContext.ts
@@ -4695,7 +4697,7 @@ var readSetupAppHook = (value) => {
4695
4697
  };
4696
4698
  var readDefaultExport = (value) => isRecord2(value) ? value.default : undefined;
4697
4699
  var resolveCurrentGeneratedVueModulePath = async (pagePath) => {
4698
- const pageDirectory = dirname2(pagePath);
4700
+ const pageDirectory = dirname3(pagePath);
4699
4701
  const expectedPrefix = `${basename2(pagePath, ".js").split(".")[0]}.`;
4700
4702
  try {
4701
4703
  const pageEntries = await readdir(pageDirectory, {
@@ -5235,5 +5237,5 @@ export {
5235
5237
  Image
5236
5238
  };
5237
5239
 
5238
- //# debugId=2C4DDF70876DE5D564756E2164756E21
5240
+ //# debugId=25C24593B9DAD6C164756E2164756E21
5239
5241
  //# sourceMappingURL=index.js.map