I think the tree shaking process is part of the angular-cli AOT build feature, but the documentation itself does not give a lot of information about how exactly this is done and weather or not you can enable/disable this feature. As far as I'm concerned, there is no straight forward way to just disable tree shaking within the angular-cli. The cli documentation states the following:
All builds make use of bundling and limited tree-shaking, while --prod builds also run limited dead code elimination via UglifyJS.
So this seems to be pretty much hooked into AOT. Disabling tree shaking is probably also contrary to what the angular-cli has been trying to achieve with its building options for the last year or so, mainly to make it an easy to use tool to decrease angular's bundling sizes.
The angular-cli provides some options to adjust the building, but for the tree shaking part, I guess you either have to go with it somehow, or, if not possible, you probably have to dig a lot deeper and try to create your own build with something like webpack (which the cli uses underneath its hood I think). You can adjust pretty much everything there. This freedom of course comes with the cost of an increased time investment to create an efficient build that is comparable to angular's build command.