Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the webpack.config.js in angular-cli new project?

I'm looking into webpack and also angular-cli, and even though angular-cli is supposed to use webpack, I can't see any webpack.config.js file when I create a new project with ng new

Does anybody know how does this work in angular-cli?

like image 979
David Avatar asked Jan 09 '17 13:01

David


People also ask

Where can I find webpack config js in Angular project?

To enable custom webpack configurations, open the angular. json configuration file. Locate the line "builder": "@angular-devkit/build-angular:browser" inside the architect.

Where webpack config JS is located?

To answer your specific question, the webpack configuration is stored wherever your global node_modules are installed; on Windows this is typically %AppData%\Roaming\npm\node_modules\powerbi-visuals-tools\lib\webpack. config. js.

Does Angular CLI use webpack?

The Angular CLI can create a new Angular project and it will handle the webpack configuration. However, there are situations where you will want to add custom webpack functionality.


2 Answers

I found this thread about configuring webpack in angular-cli. It seems webpack is not configureable at the moment, but they are working on it.

like image 94
István Avatar answered Sep 20 '22 06:09

István


You can use $ ng eject to generate webpack.config.js in the root folder of your project.

like image 32
Sandre Avatar answered Sep 20 '22 06:09

Sandre