We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58e8a94 commit 2817a0cCopy full SHA for 2817a0c
1 file changed
examples/react/start-bun/server.ts
@@ -63,6 +63,8 @@
63
* bun run server.ts
64
*/
65
66
+import path from 'node:path'
67
+
68
// Configuration
69
const SERVER_PORT = Number(process.env.PORT ?? 3000)
70
const CLIENT_DIRECTORY = './dist/client'
@@ -309,8 +311,8 @@ async function initializeStaticRoutes(
309
311
try {
310
312
const glob = createCompositeGlobPattern()
313
for await (const relativePath of glob.scan({ cwd: clientDirectory })) {
- const filepath = `${clientDirectory}/${relativePath}`
- const route = `/${relativePath}`
314
+ const filepath = path.join(clientDirectory, relativePath)
315
+ const route = `/${relativePath.split(path.sep).join(path.posix.sep)}`
316
317
318
// Get file metadata
0 commit comments