mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-25 00:31:36 +08:00
Merge pull request #14287 from kara/revert-pure-getters
Revert "fix(@angular-devkit/build-angular): remove pure_getters"
This commit is contained in:
parent
f189596414
commit
29609fb078
@ -279,13 +279,18 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
|
|||||||
comments: false,
|
comments: false,
|
||||||
webkit: true,
|
webkit: true,
|
||||||
},
|
},
|
||||||
compress: {
|
// On server, we don't want to compress anything. We still set the ngDevMode = false for it
|
||||||
// PURE comments work best with 3 passes.
|
// to remove dev code, and ngI18nClosureMode to remove Closure compiler i18n code
|
||||||
// See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926.
|
compress: (buildOptions.platform == 'server' ? {
|
||||||
passes: 3,
|
|
||||||
global_defs: angularGlobalDefinitions,
|
global_defs: angularGlobalDefinitions,
|
||||||
},
|
} : {
|
||||||
// We want to avoid mangling on server.
|
pure_getters: buildOptions.buildOptimizer,
|
||||||
|
// PURE comments work best with 3 passes.
|
||||||
|
// See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926.
|
||||||
|
passes: buildOptions.buildOptimizer ? 3 : 1,
|
||||||
|
global_defs: angularGlobalDefinitions,
|
||||||
|
}),
|
||||||
|
// We also want to avoid mangling on server.
|
||||||
...(buildOptions.platform == 'server' ? { mangle: false } : {}),
|
...(buildOptions.platform == 'server' ? { mangle: false } : {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user