sp90 / treaty

Angular running on Bun served by Elysia cached with Surrealdb
3 stars 1 forks source link

[Known issue] - awaiting 2 bugs to build angular using bun #9

Open sp90 opened 8 months ago

sp90 commented 8 months ago

Currently, we can build doing bun run build and bun run watch This is due to the shebang in ng aka angular-cli

We can circumvent that by using bun run --bun build and bun run --bun watch but this results in two bugs

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

vicentematus commented 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?

Jordan-Hall commented 8 months ago

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

Jordan-Hall commented 8 months ago

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

vicentematus commented 8 months ago

Thanks for the info @Jordan-Hall and @sp90 . I'm going to hit you up in the coming weeks via this thread.