opentui
opentui copied to clipboard
Export solid plugin properly
Define the export properly for solid plugin in package.json, so instead of
import solidPlugin from "./node_modules/@opentui/solid/scripts/solid-plugin"
await Bun.build({
entrypoints: ["./index.tsx"],
target: "bun",
outdir: "./build",
plugins: [solidPlugin],
compile: {
target: "bun-darwin-arm64",
outfile: "app-macos",
},
})
We can do
import solidPlugin from "@opentui/solid/plugin"
// or
import solidPlugin from "@opentui/solid/bun-plugin"
await Bun.build({
entrypoints: ["./index.tsx"],
target: "bun",
outdir: "./build",
plugins: [solidPlugin],
compile: {
target: "bun-darwin-arm64",
outfile: "app-macos",
},
})
Would be a nice qol improvement
Is there anything that prevents this? I'm genuinely curious because it seems easy I'll try it and if it is then I'll open a PR later :)
Should be totally possible to export an entrypoint for the plugin. I don't see anything blocking that, @Adictya ?
I don't see anything blocking that, @Adictya ?
Yup nothing blocking it, go ahead @ericc-ch
import solidPlugin from "@opentui/solid/bun-plugin" sounds good
Done! Didn't realize it was literally just one line lol