Skip to content

Commit

Permalink
Hardcode the search worker entry to avoid error messages in Firefox.
Browse files Browse the repository at this point in the history
I would prefer to avoid hardcoding any paths except those that are published as CDN entry points, but `esbuild` still doesn't support `new URL(…, import.meta.url)` (evanw/esbuild#312) or `import.meta.resolve(…)` (evanw/esbuild#2866).
  • Loading branch information
lgarron committed Sep 8, 2023
1 parent da82ad2 commit 6340217
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion script/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ const result = await build({
external: ["node:*"],
sourceRoot: "./src/js",
outdir: join(DIST_CDN, "js"),
entryPoints: ["./src/js/**/*.ts"],
entryPoints: [
"./src/js/**/*.ts",
{
// Hardcode the search worker entry to avoid error messages in Firefox
// TODO: Remove this if https:/evanw/esbuild/issues/312 or https:/evanw/esbuild/issues/2866 is ever implemented.
in: "node_modules/cubing/dist/cubing/search-worker-entry.js",
out: "search-worker-entry",
},
],
});

await build({
Expand Down

0 comments on commit 6340217

Please sign in to comment.