Z
Z
zlodiak2018-08-21 15:30:54
Angular
zlodiak, 2018-08-21 15:30:54

What is the function of webpack.config.js in angular?

Please help me understand the role of webpack.config.js in angular6
After installing angular6, the webpack.config.js file does not exist. However, the webpack works and collects the build. So the config is taken from another place. Let it be.
But if I create a webpack.config.js file and fill in one of the sections (for example, Output), will this mean that Output will be taken from webpack.config.js, and the rest of the values ​​​​from the same unknown config?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Luzanov, 2018-08-21
@zlodiak

But if I create a webpack.config.js file and fill in one of the sections (for example, Output), will this mean that Output will be taken from webpack.config.js, and the rest of the values ​​​​from the same unknown config?

No. I can advise for these purposes (if the settings in angular.json are not enough) https://www.npmjs.com/package/ngw

V
Vasily Mazhekin, 2018-08-21
@mazhekin

There is a command ng eject. Run it and the web config of the project will be laid out for you from the bowels of angular, after that the ng ... commands will stop working. This is how it was on Angular versions 2-5. On the sixth, this is a problem, probably not yet completed https://github.com/angular/angular-cli/issues/10618
Google by the name of the team, maybe there is an alternative for the sixth angular. The answer next to package/ngw is one of the options.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question