@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/build.js CHANGED
@@ -3014,6 +3014,18 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
3014
3014
  return runPostcss(await readFile(filePath, "utf-8"), filePath, config);
3015
3015
  }
3016
3016
  return compileStyleSource(filePath, undefined, undefined, config);
3017
+ }, CSS_IMPORT_PATTERN, resolveCssImportsSync = (content, baseDir, visited) => {
3018
+ return content.replace(CSS_IMPORT_PATTERN, (match, importPath) => {
3019
+ const fullPath = isAbsolute(importPath) ? importPath : resolve5(baseDir, importPath);
3020
+ if (visited.has(fullPath))
3021
+ return "";
3022
+ if (!existsSync4(fullPath))
3023
+ return match;
3024
+ const nextVisited = new Set(visited);
3025
+ nextVisited.add(fullPath);
3026
+ const imported = readFileSync3(fullPath, "utf-8");
3027
+ return resolveCssImportsSync(imported, dirname2(fullPath), nextVisited);
3028
+ });
3017
3029
  }, compileStyleFileIfNeededSync = (filePath, config) => {
3018
3030
  const rawContents = readFileSync3(filePath, "utf-8");
3019
3031
  const language = getStyleLanguage(filePath);
@@ -3031,7 +3043,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
3031
3043
  }
3032
3044
  const contents = withAdditionalData(rawContents, options.additionalData);
3033
3045
  const loadPaths = normalizeLoadPaths(filePath, options.loadPaths);
3034
- return sass.compileString(contents, {
3046
+ const compiled = sass.compileString(contents, {
3035
3047
  importers: [
3036
3048
  createSassImporter(filePath, loadPaths, language, config)
3037
3049
  ],
@@ -3040,6 +3052,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
3040
3052
  syntax: language === "sass" ? "indented" : "scss",
3041
3053
  url: new URL(`file://${filePath}`)
3042
3054
  }).css;
3055
+ return resolveCssImportsSync(compiled, dirname2(filePath), new Set([filePath]));
3043
3056
  }
3044
3057
  if (language === "less") {
3045
3058
  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.`);
@@ -3047,7 +3060,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
3047
3060
  if (language === "stylus") {
3048
3061
  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.`);
3049
3062
  }
3050
- return rawContents;
3063
+ return resolveCssImportsSync(rawContents, dirname2(filePath), new Set([filePath]));
3051
3064
  }, getCssOutputExtension = (filePath) => isPreprocessableStylePath(filePath) ? ".css" : extname3(filePath);
3052
3065
  var init_stylePreprocessor = __esm(() => {
3053
3066
  CSS_EXTENSION_PATTERN = /\.css$/i;
@@ -3060,6 +3073,7 @@ var init_stylePreprocessor = __esm(() => {
3060
3073
  styleDependencyGraph = new Map;
3061
3074
  styleOutputHashes = new Map;
3062
3075
  stylePreprocessorPlugin = createStylePreprocessorPlugin();
3076
+ CSS_IMPORT_PATTERN = /@import\s+["']([^"']+)["']\s*;?/g;
3063
3077
  });
3064
3078
 
3065
3079
  // src/core/svelteServerModule.ts
@@ -19824,5 +19838,5 @@ export {
19824
19838
  build
19825
19839
  };
19826
19840
 
19827
- //# debugId=2EEDD738FB4FC7B664756E2164756E21
19841
+ //# debugId=9A6C38A07D4967CB64756E2164756E21
19828
19842
  //# sourceMappingURL=build.js.map