Restore the dashboard thumbnail rendering using wasm (#7796)

* Revert "🐛 Rollback esm worker (#7792)"

This reverts commit 0120a5335b.

* 🐛 Fix incorrect manifest reading on building worker
This commit is contained in:
Andrey Antukh
2025-11-21 11:42:40 +01:00
committed by GitHub
parent 956ad88e51
commit b03cfffb9e
4 changed files with 23 additions and 25 deletions

View File

@@ -180,7 +180,7 @@ export async function watch(baseDir, predicate, callback) {
});
}
async function readManifestFile(path) {
async function readManifestFile() {
const manifestPath = "resources/public/js/manifest.json";
let content = await fs.readFile(manifestPath, { encoding: "utf8" });
return JSON.parse(content);
@@ -189,27 +189,19 @@ async function readManifestFile(path) {
async function readShadowManifest() {
const ts = Date.now();
try {
const content1 = await readManifestFile(
"resources/public/js/manifest.json",
);
const content2 = await readManifestFile(
"resources/public/js/worker/manifest.json",
);
const content = await readManifestFile();
const index = {
ts: ts,
config: "js/config.js?ts=" + ts,
polyfills: "js/polyfills.js?ts=" + ts,
worker_main: "js/worker/main.js?ts=" + ts,
};
for (let item of content1) {
for (let item of content) {
index[item.name] = "js/" + item["output-name"];
}
for (let item of content2) {
index["worker_" + item.name] = "js/worker/" + item["output-name"];
}
return index;
} catch (cause) {
return {