diff --git a/build.mjs b/build.mjs index 7053ad4..2fe6f8c 100644 --- a/build.mjs +++ b/build.mjs @@ -86,6 +86,11 @@ async function buildPlugin(plugin) { await bundle.write(options.output); await bundle.close(); + const toHash = readFileSync(outPath); + manifest.hash = createHash("sha256").update(toHash).digest("hex"); + manifest.main = "index.js"; + writeFileSync(`./dist/${plugin}/manifest.json`, JSON.stringify(manifest)); + console.log(`${plugin}: ` + "\x1b[32m" + "Build succeed!" + "\x1b[0m"); return; }