ImLunaHey / serve-static-bun

Serve static files using Bun.serve or Bao.js
https://npm.im/serve-static-bun
MIT License
22 stars 1 forks source link

using `.` as the directory causes weird issues #6

Open ImLunaHey opened 9 months ago

ImLunaHey commented 9 months ago
import serveStatic from 'serve-static-bun';

const serve = serveStatic('.', {
  collapseSlashes: true,
});

Bun.serve({
  port: 3000,
  fetch: serve,
});
➜  bun-rsc git:(main) ✗ bun run ./src/file.ts                                         
Response (4.50 PB) {
  ok: true,
  url: "",
  status: 200,
  statusText: "",
  headers: Headers {
    "content-type": "text/javascript; charset=utf-8",
  },
  redirected: false,
  bodyUsed: false,
  FileRef ("/Users/luna/code/imlunahey/bun-rsc/.//build/_client.js") {
    type: "text/javascript;charset=utf-8"
  }
}
[1]    19614 segmentation fault  bun run ./src/file.ts
➜  bun-rsc git:(main) ✗ bun run ./src/file.ts
[1]    19658 segmentation fault  bun run ./src/file.ts
➜  bun-rsc git:(main) ✗ ls -lah /Users/luna/code/imlunahey/bun-rsc/.//build/_client.js
-rw-r--r--  1 luna  staff   1.2M Dec 26 12:41 /Users/luna/code/imlunahey/bun-rsc/.//build/_client.js
jakobbouchard commented 2 months ago

Hello! :wave: I no longer work in web development, and do not have a lot of free time or interest in maintaining this package anymore. I am closing all issues and PR for it and will archive the repository, but if anybody is interested in maintaining it, I am willing to transfer the repository and NPM package.