cdn.how/build.ts
2025-01-29 21:20:49 -05:00

22 lines
467 B
TypeScript

const build = async (minify: boolean) => {
const start = Date.now();
const built = await Bun.build({
entrypoints: ["./src/index.html"],
outdir: "./dist",
html: true,
experimentalCss: true,
splitting: true,
sourcemap: "linked",
minify,
loader: {
".woff2": "file",
},
});
const end = Date.now();
console.log("Did build", built.success, built.logs);
console.log("Build time:", end - start, "ms");
};
await build(true);
export default build;