bun-framework-react
Version:
React framework integration with RSC, for the Bun Rendering API
37 lines (33 loc) • 905 B
text/typescript
import type { Framework } from "bun:app";
function resolve(specifier: string) {
return require.resolve(specifier);
}
const framework: Framework = {
fileSystemRouterTypes: [
{
root: "pages",
clientEntryPoint: resolve("./client.tsx"),
serverEntryPoint: resolve("./server.tsx"),
extensions: [".tsx", ".jsx"],
style: "nextjs-pages",
layouts: true,
ignoreUnderscores: true,
prefix: "/",
ignoreDirs: ["node_modules", ".git"],
},
],
serverComponents: {
separateSSRGraph: true,
serverRegisterClientReferenceExport: "registerClientReference",
serverRuntimeImportSource: resolve("./vendor/react-server-dom-bun/server.node.unbundled.js"),
},
reactFastRefresh: {
importSource: resolve("react-refresh/runtime"),
},
bundlerOptions: {
ssr: {
conditions: ["react-server"],
},
},
};
export default framework;