Skip to content

esbuild is so not cursed you can copy html with it #5

@alinkedd

Description

@alinkedd

like this:

async function build() {
  await fs.rm("dist", { recursive: true, force: true });

  console.log("Building project");
  await sleep(Math.random() * 5000); // gotta keep up with the trends

  await esbuild.build({
    entryPoints: [{ in: "client.jsx", out: "js"}, "index.html"],
    outdir: "dist",
    loader: { ".html": "copy" },
    minify: true,
    bundle: true,
    sourcemap: true,
    plugins: [useCPlugin],
  });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions