i am facing difficult using webpack when to install within phoenix framework 1.5.7 because the webpack is still version 4.x.x infact the webpack now in version 5.x.x, configuring that is more painfull, i hope there is another alternative package…
Corresponding tweet for this thread:
Share link for this tweet.
Looks like 5 support will be coming very soon @ariandanim
Thanks Aston, i will waiting for it… now i am try develop my app phoenix with webpack 4, when the webpack 5 is shipped, i will upgraded…
The PR contains all necessary information to make the update to webpack 5
You could try Snowpack. Haven’t tried it myself though, just seen it mentioned on HN several times.
I wonder if you could extract the steps and post them here? Might be helpful for anyone searching for the same in future? (Or we could just link to an EF thread if one already exists )
Snowpack get’s a mention here (from this thread):
Hadn’t even heard of most of those
Steps to update to webpack 5 have been extracted in this post
I’ve been toying with Vite to see if it’s compatible enough with backends like Phoenix. Vite uses esbuild and still bundles for production. The speed is great, but the workflow is different in that it requires another web server (in addition to Phoenix) to take the http requests during dev. I think that’ll be ok, but it’s different.
The current problem I’m running into with it is successfully killing the Vite dev server when I kill my local server. I may have to write a nodejs wrapper like this to listen to stdin.
If I get somewhere acceptable with it, I’ll probably write a post on my blog
Every few months on one of the Elixir apps I maintain, Webpack would shit the bed and I’d have to spend a day fixing it. I’m not experienced enough with the front-end stack but I took a few hours to switch to Parcel and I’ve had ZERO issues since. This specific app has 2 large Elm components and Parcel handles Elm without any issues.
I have no idea what’s “better” than Parcel, but I was impressed with how simple it was to configure and how stable it’s been.
I wonder if you could write up/blog a quick guide Jesse? I think more and more people prefer simplicity these days, especially when it comes to JS and so could prove helpful to a lot of people (and maybe even convince the Phoenix team to look into it)
Please also keep us posted on how you get on @dbernheisel!
I can, should, and I promise I will!
Looking back over the commits, it looks like I based my changes on Dwolla’s writeup so I’ll just link to that
tldr; still lots of moving pieces, still good to wait if you’re considering Vite.
Following up about Vite and Phoenix, earlier in the Vite beta I was unsuccessful to get them to work well with each other, but Vite’s beta evolves quickly and may change to make it better. After my attempt, someone else stepped up and got it working, so check out their guide (IMO it’s still a little rough):
My test repo: GitHub - dbernheisel/vite-phoenix-test
lostkobrakai’s test repo: GitHub - LostKobrakai/phoenix-vite