build(common): mark locales files as side-effect-full (#23366)

These files are in the UMD format for greater portablity, and as such
can't be marked as side-effect-free by webpack/build-optimizer/uglify.

PR Close #23366
This commit is contained in:
Igor Minar 2018-04-13 09:55:36 -07:00
parent eac36d7e1a
commit aa27155618
2 changed files with 5 additions and 0 deletions

View File

@ -13,6 +13,7 @@ ts_library(
npm_package(
name = "package",
srcs = ["package.json"],
replacements = {
# Workaround for https://github.com/angular/angular/issues/23217
# Webpack will detect that the UMD outputs from TypeScript pass the

View File

@ -0,0 +1,4 @@
{
"description": "This directory contains UMD files which by its nature are not side-effect free. The parent package.json marks the whole @angular/common package as side-effect free, so if this directory is not excluded from that, build-optimizer will mark the contents as side-effect free and uglify will incorrectly remove all needed localization code.",
"sideEffects": false
}