INNER CODE UNIT · TypeScript
matchesOldAppPattern
gimlet-io/capacitor · bundle.ts:111
const matchesOldAppPattern = (/^app-[a-f0-9]{8}\.js$/).test(entry.name) && entry.name !== jsFileName;
const matchesLegacyAppName = entry.name === "app.js"; // clean legacy un-hashed build
if (matchesOldAppPattern || matchesLegacyAppName) {
try { await Deno.remove(`bundle/js/${entry.name}`); } catch (_) { /* ignore */ }
}
}
}
// Hash and rename CSS, then rewrite index.html to point to hashed assets
const cssFileName = await hashAndRenameCss();
await rewriteIndexHtml({ jsFileName, cssFileName });
esbuild.stop();
console.log("Build complete to bundle/ with hashed assets:", { jsFileName, cssFileName });