Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/bench.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</head>
<body>
<div id="app"></div>
<script type="module" src="./bench.js"></script>
<script type="module" src="./bench-runner.js"></script>
</body>
</html>
9 changes: 6 additions & 3 deletions web/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ for (const name of components) {
await Deno.remove(distDir, { recursive: true }).catch(() => {});
await ensureDir(distDir);

// Bundle the browser entries.
for (const entry of ["entry", "bench"]) {
// Bundle the browser entries. The bench bundle is NOT named bench.js:
// tachometer's server reserves `/bench.js` for its own callback-mode
// client helper and serves that instead of the file on disk, so a bundle
// of that name never runs under it.
for (const [entry, out] of [["entry", "entry"], ["bench", "bench-runner"]]) {
const bundle = new Deno.Command(Deno.execPath(), {
args: [
"bundle",
Expand All @@ -48,7 +51,7 @@ for (const entry of ["entry", "bench"]) {
"--minify",
join(webDir, `${entry}.ts`),
"-o",
join(distDir, `${entry}.js`),
join(distDir, `${out}.js`),
],
cwd: root,
stdout: "inherit",
Expand Down
Loading