File tree 3 files changed +0
-18
lines changed
packages/angular_devkit/build_angular/src/tools/webpack
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
300
300
sourcemap : scriptsSourceMap ,
301
301
supportedBrowsers : buildOptions . supportedBrowsers ,
302
302
keepIdentifierNames : ! allowMangle || isPlatformServer ,
303
- keepNames : isPlatformServer ,
304
303
removeLicenses : buildOptions . extractLicenses ,
305
304
advanced : buildOptions . buildOptimizer ,
306
305
} ) ,
Original file line number Diff line number Diff line change @@ -61,13 +61,6 @@ export interface JavaScriptOptimizerOptions {
61
61
*/
62
62
keepIdentifierNames : boolean ;
63
63
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
-
71
64
/**
72
65
* Enables the removal of all license comments from the output code.
73
66
*/
@@ -166,7 +159,6 @@ export class JavaScriptOptimizerPlugin {
166
159
const optimizeOptions : OptimizeRequestOptions = {
167
160
sourcemap : this . options . sourcemap ,
168
161
define,
169
- keepNames : this . options . keepNames ,
170
162
keepIdentifierNames : this . options . keepIdentifierNames ,
171
163
target : this . targets ,
172
164
removeLicenses : this . options . removeLicenses ,
Original file line number Diff line number Diff line change @@ -32,10 +32,6 @@ export interface OptimizeRequestOptions {
32
32
*/
33
33
keepIdentifierNames : boolean ;
34
34
35
- /**
36
- * Controls whether to retain the original name of classes and functions.
37
- */
38
- keepNames : boolean ;
39
35
/**
40
36
* Controls whether license text is removed from the output code.
41
37
* Within the CLI, this option is linked to the license extraction functionality.
@@ -167,11 +163,6 @@ async function optimizeWithEsbuild(
167
163
sourcefile : name ,
168
164
sourcemap : options . sourcemap && 'external' ,
169
165
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 ,
175
166
target : options . target ,
176
167
} ) ;
177
168
} catch ( error ) {
You can’t perform that action at this time.
0 commit comments