And, once you have a lot of dependencies, ES modules won't save you. People expect web apps to load fast, and code is big. Things like Webpack help make it a lot smaller.
My point isn't that this is good, it's that it's not "indefensible". There are very real practical reasons that big companies deal with the debt of dependencies and bundlers.
npx @vue/cli@latest create my-project
This scaffolded a fully configured project with webpack, babel, typescript, eslint, a custom dev server, etc. I think react developers have a similar tool called create-react-app. I personally (or professionally, since I only use this at work; personally I just have an `index.html` and a python server) just let vue-cli handle the webpack config and forget about it. I guess rust developers use cargo to the same manner.I suspect much of the complain about the complexity of the front-end ecosystem comes from people that either a) don’t do front-end regularly and are trying to build a website for them self but get bad advice for the tools needed, or b) are backend developers at work and think they know better about the front-end then their front-end counterparts. In the case of (a), they simply just need better advice on tooling (and which tools are an overkill), the tone of my original comment was more directed at the other group (b; although the advice I gave was for the former group—whoops).
This just hides all the complexity behind a yet another layer of abstractions.
The moment something breaks due to a minor upgrade, you're screwed.
I learned to embrace the JS ecosystem and all of its quirks a long time ago. I think the ecosystem is first class and better than most other ecosystems I've part of. None of the dissenters ever have good enough arguments to sway me. To each their own, but JS is a fantastic, vibrant ecosystem with exceptional engineers solving problems that are wholly unique to the browser.
Stop conflating the NPM ecosystem with JS.
No. Dissenters are almost always people who clearly understand how overly complex and at the same time extremely brittle frontend toolchains are. Understanding why you need these tools doesn't change the reality of what these tools are and how they work.
After working at small shops managing frontends with 1-2 other people and then moving to frontends managed by larger numbers and divisions, especially in a culture of moving quickly, things can get hairy quite fast.
Even so, it helps to make a habit of revisiting things from first principles and to also assume the beginner’s mind, collectively, to work towards more refined, elegant, simpler systems/modules based on lessons of the past.
Speaking of “normals”... it used to be normal for most people to be undernourished. Now, the normal is that the majority of people in many developed countries are overfed. And overstimulated.
Same with the code we write.
Overfed. Overstimulated.
The dangers of prosperity and excess!
But at least we have the opportunity to focus and sharpen our realities.
... Anyway, back to Webpack. Webpack is great. It is one such system that went through a lot of growing pains and complexities to get used to, not to mentioned subpar documentation in the early days, but it has evolved gracefully and is quite elegant, and has been for a few years now!
Read the docs, people!
And modern refined tools like Vue CLI, create-react-app, Next.js, and now Vite can take care of most of the “boring” frontend configuration!
No one really needs to struggle with Webpack anymore.