@absolutejs/absolute 0.19.0-beta.846 → 0.19.0-beta.847

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
@@ -2406,6 +2406,18 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2406
2406
  return runPostcss(await readFile(filePath, "utf-8"), filePath, config);
2407
2407
  }
2408
2408
  return compileStyleSource(filePath, undefined, undefined, config);
2409
+ }, CSS_IMPORT_PATTERN, resolveCssImportsSync = (content, baseDir, visited) => {
2410
+ return content.replace(CSS_IMPORT_PATTERN, (match, importPath) => {
2411
+ const fullPath = isAbsolute(importPath) ? importPath : resolve3(baseDir, importPath);
2412
+ if (visited.has(fullPath))
2413
+ return "";
2414
+ if (!existsSync3(fullPath))
2415
+ return match;
2416
+ const nextVisited = new Set(visited);
2417
+ nextVisited.add(fullPath);
2418
+ const imported = readFileSync3(fullPath, "utf-8");
2419
+ return resolveCssImportsSync(imported, dirname2(fullPath), nextVisited);
2420
+ });
2409
2421
  }, compileStyleFileIfNeededSync = (filePath, config) => {
2410
2422
  const rawContents = readFileSync3(filePath, "utf-8");
2411
2423
  const language = getStyleLanguage(filePath);
@@ -2423,7 +2435,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2423
2435
  }
2424
2436
  const contents = withAdditionalData(rawContents, options.additionalData);
2425
2437
  const loadPaths = normalizeLoadPaths(filePath, options.loadPaths);
2426
- return sass.compileString(contents, {
2438
+ const compiled = sass.compileString(contents, {
2427
2439
  importers: [
2428
2440
  createSassImporter(filePath, loadPaths, language, config)
2429
2441
  ],
@@ -2432,6 +2444,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2432
2444
  syntax: language === "sass" ? "indented" : "scss",
2433
2445
  url: new URL(`file://${filePath}`)
2434
2446
  }).css;
2447
+ return resolveCssImportsSync(compiled, dirname2(filePath), new Set([filePath]));
2435
2448
  }
2436
2449
  if (language === "less") {
2437
2450
  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.`);
@@ -2439,7 +2452,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
2439
2452
  if (language === "stylus") {
2440
2453
  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.`);
2441
2454
  }
2442
- return rawContents;
2455
+ return resolveCssImportsSync(rawContents, dirname2(filePath), new Set([filePath]));
2443
2456
  }, getCssOutputExtension = (filePath) => isPreprocessableStylePath(filePath) ? ".css" : extname(filePath);
2444
2457
  var init_stylePreprocessor = __esm(() => {
2445
2458
  CSS_EXTENSION_PATTERN = /\.css$/i;
@@ -2452,6 +2465,7 @@ var init_stylePreprocessor = __esm(() => {
2452
2465
  styleDependencyGraph = new Map;
2453
2466
  styleOutputHashes = new Map;
2454
2467
  stylePreprocessorPlugin = createStylePreprocessorPlugin();
2468
+ CSS_IMPORT_PATTERN = /@import\s+["']([^"']+)["']\s*;?/g;
2455
2469
  });
2456
2470
 
2457
2471
  // src/core/svelteServerModule.ts
@@ -4368,5 +4382,5 @@ export {
4368
4382
  Image
4369
4383
  };
4370
4384
 
4371
- //# debugId=1DF85394A798341964756E2164756E21
4385
+ //# debugId=FF18F3AE9B56CF9D64756E2164756E21
4372
4386
  //# sourceMappingURL=index.js.map