Open sp90 opened 8 months ago
Moving the thread from using Bun with Analog to here
This is my answer to that thread: @sp90 this looks good. Specially SSR on Angular for heavy enterprises applications + Bun = Speed. Also nice detach from using Zone.js
.
We are on Angular 16 as SPA, but the main blocker is using Jest (and jest-preset-angular) as the testing runner. From what I've read from Jarred twitter is there's some issues with Bun and the CLI of Jest (idk if they fixed it yet).
Maybe an alternative I was thinking was to migrate to Vitest
using the @analog
package and then use Bun
from there. What are your thoughts on that to speed up the test runners?
If we to move to vite i personally would prefer Vike plugin which is heavily based of SWC for dev but aot by angular. Its also a clean angular only and not of the extra for analog.
We using bun test here and it's working great from what we see already. If you need a hand getting anything working or finding issues happy to help.
I have a branch locally for vite. I'll clean it up and push it tomorrow
https://github.com/vikejs/vite-plugin-angular/issues/2
I've pulled this in and I'm migrating the SWC rust plugin as this which Is heavily based of my nxext repo which was the javascript plugin for swc
Thanks for the info @Jordan-Hall and @sp90 . I'm going to hit you up in the coming weeks via this thread.
Currently, we can build doing
bun run build
andbun run watch
This is due to the shebang in ng aka angular-cliWe can circumvent that by using
bun run --bun build
andbun run --bun watch
but this results in two bugsperf_hooks.createHistogram
a native node API (It's not solved in bun but is mocked in this project to avoid it as a blocker)If we then polyfill that then it results in another bug
This will be closed if we find workarounds in this project and or both are solved in the bun project