I know node/express. I know the difference between dependencies and devDependencies.
I'm learning angular. I've been through the official tutorial.
I thought an angular app is compiled - at development time - into a set of static files. Those files are uploaded to some server. Once they are downloaded by a client, all the action takes place in the client, except when it reaches out to my node/express server for data.
So I don't understand why a scaffolded angular project has a package.json with both dependencies and devDependencies. I assumed everything would be in devDependencies, because there is no package.json at runtime, only the bootstrapping html file and then all the compiled javascripts.
I'm obviously misunderstanding the deployment stage. Please correct me where I'm wrong.
I think found the answer.
Both deps and devdeps are only used during development-time, rather than at run-time (because there's no manifest at runtime, only html and compiled scripts). That was the source of my confusion.
However the compilation stage only compiles and bundles references found in the deps.
Add to that
So this is a semantic clue for the compiler to know what to bundle - it's not an issue of devtime vs runtime. So it was confusing because that's a subtle difference to how this works on the server side.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With