fix(assets): use random hash for atlas
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m51s
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m51s
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user