Lets say I have an angular app and all angular dependencies are in devDependecies... And my Node_Env =production so when I will run npm install it will not install my devDependecies on my server then how ng commands like ng build or ng serve will work?
sorry but i can't still understand i understand that dev dependencies are for testing, or webpack or lints like that, but how about installing less, craco, material ui, font awesome aka the designing libraries? Where should I put it?
When in doubt just put all dependencies in normal dependencies, as it just results in a slightly slower build and disk size on the deployed server, but you will spend a while troubleshooting if you put something in dev dependencies and then try to automate the build on an external client. As to your question, any logging or anything you want to still function for your users must be included. But any linting, formatting, and unit tests do not need deployed because they are design time or self analysis so can be in the dev deps. Images or resources (fomtawesome) that are required to be pulled by webpack must still be in normal deps, as webpack itself pulls the resources from the npm folders if you have it set up that way (use the file copy plugin for webpack to copy the resources out and into the www resource folder). Otherwise you have to manually copy the files from node_modules to where webpack points.
Lets say I have an angular app and all angular dependencies are in devDependecies... And my Node_Env =production so when I will run npm install it will not install my devDependecies on my server then how ng commands like ng build or ng serve will work?
thank u for your time, good man
if we add library as dev dependency then how it will run in prod because we added only for development
Wow, Nice, exactly what I am looking for.
great explaination love all of your videos man
sorry but i can't still understand
i understand that dev dependencies are for testing, or webpack or lints like that, but how about installing less, craco, material ui, font awesome aka the designing libraries? Where should I put it?
When in doubt just put all dependencies in normal dependencies, as it just results in a slightly slower build and disk size on the deployed server, but you will spend a while troubleshooting if you put something in dev dependencies and then try to automate the build on an external client. As to your question, any logging or anything you want to still function for your users must be included. But any linting, formatting, and unit tests do not need deployed because they are design time or self analysis so can be in the dev deps. Images or resources (fomtawesome) that are required to be pulled by webpack must still be in normal deps, as webpack itself pulls the resources from the npm folders if you have it set up that way (use the file copy plugin for webpack to copy the resources out and into the www resource folder). Otherwise you have to manually copy the files from node_modules to where webpack points.
Bro is that NODE_ENV sets property to global env ? Is there any global env or it just like setting environment variable for windows.??Thanks
NODE_ENV should be a global variable set to the environment you're working in.
Whoa I’m gonna check if this fixes my issue! Even if it doesn’t, this was quite informative!
Great explained, thanks
good described