File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
example/2-client-component Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,14 @@ import { Hono } from "hono";
22import { serveStatic } from "hono/bun" ;
33import { build } from "plainstack/bun" ;
44import { render } from "plainstack/client" ;
5- import { Counter } from "./client/ counter" ;
5+ import { Counter } from "./counter" ;
66
77const app = new Hono ( ) ;
88
99app . use ( "/static/*" , serveStatic ( { root : "./example/2-client-component" } ) ) ;
1010
1111await build ( {
12- entrypoints : "example/2-client-component/client" ,
12+ entrypoints : [ "example/2-client-component/counter.tsx" ] ,
1313 outdir : "example/2-client-component/static" ,
1414} ) ;
1515
File renamed without changes.
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { randomBytes } from "node:crypto";
33import { readdir } from "node:fs/promises" ;
44import { join } from "node:path" ;
55import type { BuildConfig as BunBuildConfig } from "bun" ;
6+ import consola from "consola" ;
67import { CamelCasePlugin , Kysely } from "kysely" ;
78import { BunSqliteDialect } from "kysely-bun-sqlite" ;
89import { bun } from "plainjob" ;
@@ -51,12 +52,16 @@ export async function build(options: BuildConfig) {
5152 files . map ( ( file ) => join ( options . entrypoints as string , file ) ) ,
5253 )
5354 : options . entrypoints ;
54- console . log ( entrypointfiles ) ;
55- return await Bun . build ( {
55+ const result = await Bun . build ( {
5656 outdir : "static" ,
5757 sourcemap : "linked" ,
58- minify : prod ( ) ,
58+ minify : false , // TODO this breaks the naming atm
5959 ...options ,
6060 entrypoints : entrypointfiles ,
6161 } ) ;
62+ if ( process . env . PS_BUILD ) {
63+ consola . info ( "✓ build finished, PB_BUILD=1 exiting process..." ) ;
64+ process . exit ( 0 ) ;
65+ }
66+ return result ;
6267}
You can’t perform that action at this time.
0 commit comments