Why so many dependencies?

I’m very new to Aurelia and was encouraged by the simplicity of the initial tutorial. Then came the cli and 906 dependencies. Why does every project have to have these? Are they really required to run even the simplest of apps? There isn’t an explanation in the documentation on why these are included and if I even need them. Looking in the node-modules folder is a bit scary. It sure would be nice if something was said about these.

2 Likes

hey @Digitalman42 - welcome to modern day Javascript development.

And yes, it is SUPER scary - basically we now use hundreds of tiny ‘snippets’ of code, typically developed with a single purpose (e.g. ‘left-pad’ - see: https://qz.com/646467/ for an interesting story).

But once these are all minified down, there isn’t a major issue with regard to size, load time, etc.

2 Likes

Most of them are tools for build in Nodejs side, they are not bundled in your final dist code for browser.

And Nodejs developers have a habit to reuse other people’s libraries, even when it’s just a one line implementation… You can see there are lots of tiny packages in your node_modules folder like is-obj, is-number… A lot of them are not needed anymore because latest Nodejs has native JavaScript API to cover them.

I share your sadness, it’s unbearable for people really care about hygiene. :slight_smile:

4 Likes

I see now. node.js dependencies. I guess I need to continue learning the UI side of things. Good to know not all these code modules are not included in my final dist.

1 Like