montogeek
Hi!
I was going to post this in GitHub but I think it is better here.
Would you accept a PR to upgrade to webpack 5?
Cheers!
Trending in Discussions
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
Hi there! :wave:
@frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
What IDE or editor are you using for Elixir development?
Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog
It says that Fly is going all-in on sprites, which is a worry ...
New
This was an interesting post by Jose. Curious to hear what others think. Evolving programming languages in the AI era - Dashbit Blog
Gen...
New
In my third year of college, around 2010, I found Erlang. A few years later, I found Elixir. I liked the ideas at once: many small proces...
New
Other Trending Topics
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #hex











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
mindok
I’d say post to github (raise an issue with the offer of the PR) or the appropriate slack channel…
outlog
webpack5 is brand new - so it could be a stopper for people at present as the whole eco system has to catch up..
say I do phx new (that includes webpack5), and then want to drop in a react SPA, I’ll run into webpack5 issues.. so I would probably say some 6 months, before the entire system has caught up..
(that said a PR, showing how simple/complex the upgrade is would be awesome..)
montogeek
Will create it then
outlog
just be to clear I have no saying in PR/merging for phoenix, but from experience there is a philosophy of keeping the phoenix webpack config as simple/minimal as possible, so strive for that, and go for minimal changes/complexity/features..
webuhu
@montogeek I could assist the PR.
hard-source-webpack-plugincould be removed in my understanding with webpack v5.In
dev.exs--watch-stdinneeds to be replaced with--watch+--watch-options-stdin.In case for keeping it as simple/minimal as possible,
I would propose to replace additionally within
package.json:with
Very opinionated, as I think webpack is to verbose,
I always also add
--stats errors-onlyfor deployand
--stats minimalfor development to the webpack commands.ondrej-tucek
Well, from my recently experience with webpack 5, when I replaced
--watch-stdinto--watch --watch-options-stdinthen watching files for updates stopped working. For instance, when I changed some content of css/scss/… no compilation happened. So I ended up only with--watch, but a few deprecation warning shown during compilation. Also if you usemini-css-extract-pluginyou have to addpublicPath. In my case was successfulpolypush135
Wepack 5 breaks the way I was chunking my file names.
Specifically, Output.chunkFilename is dead, hard-source-webpack-plugin is broken
And I’ve had to fix the way I bundle wasm and how I resolve two libs now that they don’t include the core nodejs libs.
https://github.com/MorphicPro/morphic.pro/pull/254/files#diff-d39fdca60f5c65460eef279b514c898ded5b0ac5eab453ab1d4fe9d54032a2dbR28-R39
At the end of the day Output.chunkFilename has prevented me from fully upgrading because I’m not sure how to still bundle out my vendor.bundle.js and it now looks to just be broken.
I really hate webpack.
montogeek
I won’t work on this, discouraged by these statements:
Feel free anybody to pick it.
mindok
I think you should be encouraged rather than discouraged! I think many of us have been frustrated with webpack from time to time and that frustration can result in saying something without thinking about the consequences. I personally find it difficult to work with. But it is an essential part of modern web apps so I’m delighted that someone is putting their hand up to smooth out the bumps of a version upgrade.
polypush135
Imagine you lived in a world where everyone massaged everyone’s ego because everyone was too sensitive to say what they really feel. Yeah, I hate webpack, Who fucking cares. And guess what, It’s possible to make bad software and it’s possible that software causes real pain for their users. Any good dev knows the first rule to good design is to be empathetic so if anything I’m doing the devs of Webpack a favor by not sugar-coating how painful the process currently is. That should be in its self an indication that more energy really should go to identify the problems they cause for their users otherwise they may not have users to care anymore. And if you are so sensitive that the mention of dislike persuades you from trying then boy you are in the wrong industry. Everyone will hit these points in their dev career, try to move past the small talk and not be so squishy.
Also in my context I’m not using the default Phoenix webpack config, because I like to chunk out my vendor and my app into separate files which is where I currently hit the wall. So your efforts will not be likely impacted by the issues I’ve identified.