feat(cli): Adding support for custom uglify options in .angular-cli.json#5192
feat(cli): Adding support for custom uglify options in .angular-cli.json#5192jgodi wants to merge 2 commits intoangular:masterfrom
Conversation
|
Thank you for putting in the time for this PR. However the CLI's current approach to build customization is via the eject option ( There are plans in the future to allow incremental changes to the existing build process without having to eject but that level of granularity is not ready yet. |
|
@Brocco is this still the way to go about it by ejecting the full config in case I wish to modify the mangle |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Description
Adding an option into the
.angular-cli.jsonto provide custom options to the UglifyJsPlugin that is used for production builds.Why?
We are using some older libraries inside our Angular application that when we build for production we require the
compress: { keep_fnames: true }on the UglifyJsPlugin plugin. The CLI does not currently support this, so I added a way to pass any options to the UglifyJsPlugin.The
.angular-cli.jsoncan now have the following property:Then this will just merge the already defaulted options that were there with any new options that the user needs or wants.
This issue was brought up and closed in a few PRs and tickets, but there was never a solution. (#1662 & #3167)