Skip to content

Commit af713e8

Browse files
robelestclaude
andcommitted
fix(examples/sveltekit): use node provider with bun install
Railpack doesn't have a bun provider, but we can use node provider and override the install command to use bun. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 49476a0 commit af713e8

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

examples/sveltekit/railpack.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
{
22
"$schema": "https://schema.railpack.com",
3-
"provider": "bun"
3+
"provider": "node",
4+
"packages": {
5+
"bun": "latest"
6+
},
7+
"steps": {
8+
"install": {
9+
"commands": ["bun install"]
10+
}
11+
}
412
}

examples/sveltekit/src/convex/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { query } from "./_generated/server";
66
import { betterAuth } from "better-auth/minimal";
77
import authConfig from "./auth.config";
88

9-
const siteUrl = process.env.SITE_URL!;
9+
const siteUrl = process.env.PUBLIC_CONVEX_SITE_URL!;
1010

1111
export const authComponent = createClient<DataModel>(components.betterAuth);
1212

examples/sveltekit/vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export default defineConfig({
1717
},
1818
resolve: {
1919
dedupe: ["yjs", "lib0", "y-protocols"],
20+
alias: {
21+
// Stub the worker import during SSR (Node.js can't handle ?worker suffix)
22+
"@trestleinc/replicate/worker?worker": "@trestleinc/replicate/worker",
23+
},
2024
},
2125
server: {
2226
headers: {

0 commit comments

Comments
 (0)