We usually use Angular CLI to scaffold our Angular app, but in this case, webpack file is hidden. ng eject
was used if you need to do something a lot more advance or custom with webpack than what the cli provides for commands like ng build
and ng serve
. So it generates a webpack.config.js
based on the configurations that the cli uses, so that you can then customize it further. However, that also means that you’ll be able to use certain commands like ng build
and ng serve
.
The eject
command has been temporarily disabled in Angular 6, as it is not yet compatible with the new angular.json format. The new configuration format provides further flexibility to modify the configuration of your workspace without ejecting. Ejection will be re-enabled in a future release of the CLI.
If you need to eject today, use CLI 1.7 to eject your project.