@absolutejs/absolute 0.20.0-beta.158 → 0.20.0-beta.159

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
@@ -21070,6 +21070,29 @@ var init_compileSvelte = __esm(() => {
21070
21070
  transpiler3 = new Transpiler2({ loader: "ts", target: "browser" });
21071
21071
  });
21072
21072
 
21073
+ // src/build/dedupeCssBlocks.ts
21074
+ var dedupeCssBlocks = (blocks) => {
21075
+ const seen = new Set;
21076
+ const result = [];
21077
+ for (const block of blocks.toReversed()) {
21078
+ const syntax = block.replace(/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\/\*[\s\S]*?\*\//g, "");
21079
+ if (/@(?:import|namespace)\b|@[\w-]*\\/i.test(syntax)) {
21080
+ seen.clear();
21081
+ result.push(block);
21082
+ continue;
21083
+ }
21084
+ if (/@layer\b/i.test(syntax)) {
21085
+ result.push(block);
21086
+ continue;
21087
+ }
21088
+ if (seen.has(block))
21089
+ continue;
21090
+ seen.add(block);
21091
+ result.push(block);
21092
+ }
21093
+ return result.reverse();
21094
+ };
21095
+
21073
21096
  // src/build/parseVueSpaRoutes.ts
21074
21097
  import ts17 from "typescript";
21075
21098
  var propertyName = (node) => ts17.isIdentifier(node) || ts17.isStringLiteralLike(node) ? node.text : null, stringValue = (node) => ts17.isStringLiteralLike(node) ? node.text : null, findVueImport = (node) => {
@@ -21547,7 +21570,7 @@ import { createHash as createHash6 } from "crypto";
21547
21570
  import { existsSync as existsSync30, readFileSync as readFileSync29 } from "fs";
21548
21571
  import { mkdir as mkdir9, rename as rename2, writeFile as writeFile9 } from "fs/promises";
21549
21572
  import { join as join42, resolve as resolve34 } from "path";
21550
- var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs", CACHE_FORMAT_VERSION = 2, FILE_NAME_HASH_LENGTH = 32, vueCompileCacheEnabled = () => process.env.ABSOLUTE_COMPILE_CACHE !== "0", hashContent = (content) => createHash6("sha256").update(content).digest("hex"), hashParts = (parts) => {
21573
+ var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs", CACHE_FORMAT_VERSION = 3, FILE_NAME_HASH_LENGTH = 32, vueCompileCacheEnabled = () => process.env.ABSOLUTE_COMPILE_CACHE !== "0", hashContent = (content) => createHash6("sha256").update(content).digest("hex"), hashParts = (parts) => {
21551
21574
  const hash = createHash6("sha256");
21552
21575
  for (const part of parts) {
21553
21576
  hash.update(part);
@@ -22613,10 +22636,10 @@ var resolveDevClientDir3 = () => {
22613
22636
  sourceFilePath,
22614
22637
  styleSources
22615
22638
  }));
22616
- const allCss = [
22639
+ const allCss = dedupeCssBlocks([
22617
22640
  ...localCss,
22618
22641
  ...childBuildResults.flatMap((result) => result.cssCodes)
22619
- ];
22642
+ ]);
22620
22643
  const cssOutputFile = isEntryPoint && allCss.length ? join45(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`) : null;
22621
22644
  const cssOutputPaths = cssOutputFile ? [cssOutputFile] : [];
22622
22645
  trackWrite(writeVueOutputs({
@@ -44160,5 +44183,5 @@ export {
44160
44183
  wrapPageHandlerWithStreamingSlots
44161
44184
  };
44162
44185
 
44163
- //# debugId=DE254EFC9F37D1F164756E2164756E21
44186
+ //# debugId=CED9D607F640186064756E2164756E21
44164
44187
  //# sourceMappingURL=index.js.map