File tree Expand file tree Collapse file tree 3 files changed +0
-18
lines changed
packages/angular_devkit/build_angular/src/tools/webpack Expand file tree Collapse file tree 3 files changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,6 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise<Config
300300 sourcemap : scriptsSourceMap ,
301301 supportedBrowsers : buildOptions . supportedBrowsers ,
302302 keepIdentifierNames : ! allowMangle || isPlatformServer ,
303- keepNames : isPlatformServer ,
304303 removeLicenses : buildOptions . extractLicenses ,
305304 advanced : buildOptions . buildOptimizer ,
306305 } ) ,
Original file line number Diff line number Diff line change @@ -61,13 +61,6 @@ export interface JavaScriptOptimizerOptions {
6161 */
6262 keepIdentifierNames : boolean ;
6363
64- /**
65- * Enables the retention of original name of classes and functions.
66- *
67- * **Note**: this causes increase of bundle size as it causes dead-code elimination to not work fully.
68- */
69- keepNames : boolean ;
70-
7164 /**
7265 * Enables the removal of all license comments from the output code.
7366 */
@@ -166,7 +159,6 @@ export class JavaScriptOptimizerPlugin {
166159 const optimizeOptions : OptimizeRequestOptions = {
167160 sourcemap : this . options . sourcemap ,
168161 define,
169- keepNames : this . options . keepNames ,
170162 keepIdentifierNames : this . options . keepIdentifierNames ,
171163 target : this . targets ,
172164 removeLicenses : this . options . removeLicenses ,
Original file line number Diff line number Diff line change @@ -32,10 +32,6 @@ export interface OptimizeRequestOptions {
3232 */
3333 keepIdentifierNames : boolean ;
3434
35- /**
36- * Controls whether to retain the original name of classes and functions.
37- */
38- keepNames : boolean ;
3935 /**
4036 * Controls whether license text is removed from the output code.
4137 * Within the CLI, this option is linked to the license extraction functionality.
@@ -167,11 +163,6 @@ async function optimizeWithEsbuild(
167163 sourcefile : name ,
168164 sourcemap : options . sourcemap && 'external' ,
169165 define : options . define ,
170- // This option should always be disabled for browser builds as we don't rely on `.name`
171- // and causes deadcode to be retained which makes `NG_BUILD_MANGLE` unusable to investigate tree-shaking issues.
172- // We enable `keepNames` only for server builds as Domino relies on `.name`.
173- // Once we no longer rely on Domino for SSR we should be able to remove this.
174- keepNames : options . keepNames ,
175166 target : options . target ,
176167 } ) ;
177168 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments