In this post, I am going to share a small tip to extract webpack file out of Angular CLI. We usually use Angular CLI to scaffold our Angular app, but in this case, webpack file is hidden.
After scaffolding the project, this is how my normal package.json file looks like
Trick is, if I execute ng eject, it will emit hidden webpack configuration file, but this will also change package.json commands like shown below.
This also mentions the command for building and running the project has now changed. Now, everything is npm command. Now, you can see that webpack.config.js file. Now, this is pretty big file, which does all the magic behind the scene. So, if you like to setup any other stuff, you can set the rule here in this file. Therefore, now package.json file looks like
I hope you would have liked this small tip around Angular. Thanks for joining me.
3,243 total views, 1 views today