fix(assets): use random hash for atlas
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m51s

This commit is contained in:
2026-02-27 10:22:44 +01:00
parent 557d0aaca5
commit 28df5ac25a

View File

@@ -1,5 +1,4 @@
import { defineNuxtModule, useLogger } from "@nuxt/kit";
import { createHash } from "crypto";
import { readdir, readFile, writeFile } from "fs/promises";
import { join, relative, parse } from "path";
import { existsSync, watch } from "fs";
@@ -300,11 +299,7 @@ ${sp} }`;
{ stdio: "pipe" },
);
const finalAtlas = await readFile(atlasOutputPath);
atlasHash = createHash("md5")
.update(finalAtlas)
.digest("hex")
.slice(0, 8);
atlasHash = Math.random().toString(36).slice(2, 10);
const imageTree = buildImageTree(imagePaths, rects);
imageCode = generateImageCode(imageTree);