@bractjs/bractjs 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/build/bundler.ts +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bractjs/bractjs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Production-grade SSR framework for Bun + React 19. File-based routing, streaming SSR, server actions, typed routes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/bractjs/bractjs#readme",
|
package/src/build/bundler.ts
CHANGED
|
@@ -16,12 +16,13 @@ export async function runBuild(config: BractJSConfig): Promise<void> {
|
|
|
16
16
|
// ── 0. Codegen — typed routes ───────────────────────────────────────────
|
|
17
17
|
await writeRouteTypes(appDir);
|
|
18
18
|
const routes = await scanRoutes(appDir);
|
|
19
|
-
const routeFilePaths = routes.map((r) => r.filePath);
|
|
19
|
+
const routeFilePaths = routes.map((r) => join(appDir, r.filePath));
|
|
20
20
|
const rootFilePath = join(appDir, "root.tsx");
|
|
21
21
|
|
|
22
22
|
// ── 1. Server bundle ────────────────────────────────────────────────────
|
|
23
|
+
const pkgRoot = join(import.meta.dir, "../..");
|
|
23
24
|
const serverResult = await Bun.build({
|
|
24
|
-
entrypoints: ["src/server/index.ts"],
|
|
25
|
+
entrypoints: [join(pkgRoot, "src/server/index.ts")],
|
|
25
26
|
target: "bun",
|
|
26
27
|
outdir: "build/server",
|
|
27
28
|
sourcemap: config.sourcemap ?? "external",
|
|
@@ -31,7 +32,7 @@ export async function runBuild(config: BractJSConfig): Promise<void> {
|
|
|
31
32
|
|
|
32
33
|
// ── 2. Client bundle (code-split) ───────────────────────────────────────
|
|
33
34
|
const clientResult = await Bun.build({
|
|
34
|
-
entrypoints: ["src/client/entry.tsx", rootFilePath, ...routeFilePaths],
|
|
35
|
+
entrypoints: [join(pkgRoot, "src/client/entry.tsx"), rootFilePath, ...routeFilePaths],
|
|
35
36
|
target: "browser",
|
|
36
37
|
splitting: true,
|
|
37
38
|
outdir: "build/client",
|