derek-zhou

derek-zhou

Of course. Here is how it look like:

image
image1536×379 24.3 KB

This is a small application with only 9 js totaling 200KB uncompressed, the bulk of it is liveview.You can see HTTP/2 downloading all the unbundled js in the chart.

3
Post #21
egze

egze

This is cool. What are steps involved to have it running?

0
Post #22
derek-zhou

derek-zhou

check the source:

https://github.com/derek-zhou/gara

Every js/css is copied like other assets using phoenix_copy | Hex at build time. no esbuild, no tailwind_cli,

4
Post #23
greven

greven

To add to what LostKobrakai wrote I would rather any solution (for assets) when scaffolding new Phoenix projects would come from a generator through a mix script.
The possibilities are endless and what’s important it’s whatever comes as default to be easy to eject and replace with whatever solution you want to go with.

Right now I think we have a good balance in that regard in Phoenix land.

2
Post #24
drselump14

drselump14

What I like with bun is I can install js packages without nodejs installation

0
Post #25
Rodeoclash

Rodeoclash

If we switched to Bun, I look forward to the inevitable request in about a years time to switch to whatever the next hot thing is in JavaScript land.

If anything, this indicates to me that perhaps you should be able to select which tool you want to instantiate a Phoenix project with and the community can maintain adapters for each of the million different frontend build chains.

4
Post #26
paulsabou

paulsabou

Bun supports Windows since April 2024. Bun 1.1 | Bun Blog

0
Post #27
PJUllrich

PJUllrich

Author of Building Table Views with Phoenix LiveView

FYI, there’s an Elixir library that makes it easy to replace esbuild with bun. It also manages Tailwind for you, so you can replace both the :tailwind and the :esbuild dependency with it: GitHub - crbelaus/bun: An installer for bun · GitHub

4
Post #28
— All posts loaded —