react-use-c icon indicating copy to clipboard operation
react-use-c copied to clipboard

esbuild is so not cursed you can copy html with it

Open alinkedd opened this issue 1 year ago • 1 comments

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],
  });
}

alinkedd avatar Oct 29 '23 23:10 alinkedd