react-use-c
react-use-c copied to clipboard
esbuild is so not cursed you can copy html with it
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],
});
}