Angular cli hook

I am looking for a way to change the build function output from

ng build --prod 

I would like to add some boot CSS files to the head section of index.html, change the name index.html => index.php, etc.

how to do it?

+7
build templates hook angular-cli
source share
1 answer

You can customize the implementation from source code. This section explains how you can continue.

In particular, you can change the following lines from addon / ng2 / models / webpack-build-common.ts .

 new HtmlWebpackPlugin({ template: path.resolve(projectRoot, `./${sourceDir}/index.php`), chunksSortMode: 'dependency' }) 

For CSS resources, they can be packaged directly if you use the Webpack Angular CLI .

EDIT

The key index in application nodes can be changed in the angular-cli.json file. The line should be changed to

 "index": "index.php", 
+3
source share

All Articles