When I import libraries like momentjs in a webpack project webpack automatically includes all their optional dependencies in the bundle too. In the case of momentjs when I do this:
import * as moment from 'momentjs'
I add 200kb into my bundle because this automatically includes ALL possible locales. Locales are 150kb where the library itself is only 50kb. In this question its described how to exclude those dependencies in the webpack configuration with the help of the ContextReplacementPlugin.
How can I do that in an angular-cli project where I don't have direct access to the webpack configuration (unless I eject the config, which has other side effects).
ng-cli
GitHub #5166 as i don't like the idea of ejecting myself to achieve this