We are working on the crash with the minifier + multiple entry points and hopefully will have a fix this week
> Bun inserts code that looks like this at the bottom of the built file, in this case from a file called account.ts
var account_default = {};
export {
account_default as default
};
Currently, Bun only supports esm output so for this to work you'll need `<script type="module">` instead of `<script>`. We will add support for IIFE though (which should fix this)
> Hopefully Bun will implement fs.watch soon and I can throw out this code.
Yeah we need to do this. It's not super hard and we have plenty of existing code for inotify and kqueue in place for watching files, there's no good reason why we haven't done this yet.
> There’s something unfinished with Bun’s implementation of the child_process module that breaks when run in the Vercel build environment.
Currently, Bun.spawn & Bun.spawnSync (which child_process uses internally) relies on `pidfd_open` (https://man7.org/linux/man-pages/man2/pidfd_open.2.html) which Vercel, due to using AWS Lambda, does not support because it is on Linux Kernel 5.10 (3 years old). We need to add a fork() + exec() fallback for this
edit: it's not pidfd_open, but it is one of these posix_spawn related calls that is missing
Great writeup
We are working on the crash with the minifier + multiple entry points and hopefully will have a fix this week
> Bun inserts code that looks like this at the bottom of the built file, in this case from a file called account.ts
Currently, Bun only supports esm output so for this to work you'll need `<script type="module">` instead of `<script>`. We will add support for IIFE though (which should fix this)> Hopefully Bun will implement fs.watch soon and I can throw out this code.
Yeah we need to do this. It's not super hard and we have plenty of existing code for inotify and kqueue in place for watching files, there's no good reason why we haven't done this yet.
> There’s something unfinished with Bun’s implementation of the child_process module that breaks when run in the Vercel build environment.
Currently, Bun.spawn & Bun.spawnSync (which child_process uses internally) relies on `pidfd_open` (https://man7.org/linux/man-pages/man2/pidfd_open.2.html) which Vercel, due to using AWS Lambda, does not support because it is on Linux Kernel 5.10 (3 years old). We need to add a fork() + exec() fallback for this
edit: it's not pidfd_open, but it is one of these posix_spawn related calls that is missing