How to eject webpack config from an Angular CLI

With the help of Angular CLI everything is done in a simple and automatic way, it’s work like magic. But sometime we have requirments that cannot be done with Angular CLI then we need Webpack config.

run following command :-

ng eject

This command makes the build configuration part of your project and gets rid of Angular CLI. And also set “ejected”: true in angular-cli.json file , create new file webpack.config.js in project root, and modified run scripts in package.json.

after ng eject we need to run npm install command to install some new dependency.

for undo ng eject, you need to edit your .angular.cli.json file and set ejected to false.

"project": {
"ejected": false

Leave a Reply

Your email address will not be published. Required fields are marked *