It is now possible, to get not flat structure of project with ng build
, so instead of this:
index.html
main.bundle.js
styles.bundle.js
...
I want scripts to be in subfolder
*index.html
scripts/main.bundle.js
scripts/styles.bundle.js
...*
I found a topic about this: 'ng build' move scripts to subfolder but hire the solutions is to eject
project from cli
into webpack
but with Angular 7
this is not longer available and ng eject
is now disabled:
The 'eject' command has been disabled and will be removed completely in 8.0. The new configuration format provides increased flexibility to modify the configuration of your workspace without ejecting.
There are several projects that can be used in conjuction with the new configuration format that provide the benefits of ejecting without the maintenance overhead. One such project is ngx-build-plus found here: https://github.com/manfredsteyer/ngx-build-plus
Angular provide very poor documentation of angular.json
file hire https://github.com/angular/angular-cli/wiki/angular-workspace so it's difficult to use this config file in real project problems.