bun-lune-loader/build.ts

13 lines
301 B
TypeScript
Raw Normal View History

2023-09-15 12:56:43 +01:00
import plugin from "./src/index";
const out = await Bun.build({
plugins: [plugin],
entrypoints: ["./examples/run.ts"],
});
if (out.success) {
eval(await out.outputs[0].text())
} else {
console.warn("Build failed:")
console.warn(out.logs.map((v) => " " + v.message).join("\n"))
}