Skip to content

Commit 1341ad6

Browse files
clydinalan-agius4
authored andcommitted
refactor(@angular-devkit/build-angular): remove unused getEsVersionForFileName helper
The `getEsVersionForFileName` helper function was previously used for recently removed differential loading support but is now unused and can also be removed.
1 parent 7b18978 commit 1341ad6

File tree

1 file changed

+0
-19
lines changed
  • packages/angular_devkit/build_angular/src/webpack/utils

1 file changed

+0
-19
lines changed

packages/angular_devkit/build_angular/src/webpack/utils/helpers.ts

-19
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
import * as path from 'path';
10-
import { ScriptTarget } from 'typescript';
1110
import { Configuration, SourceMapDevToolPlugin } from 'webpack';
1211
import { ExtraEntryPoint, ExtraEntryPointClass } from '../../builders/browser/schema';
1312

@@ -93,24 +92,6 @@ export function getSourceMapDevTool(
9392
});
9493
}
9594

96-
/**
97-
* Returns an ES version file suffix to differentiate between various builds.
98-
*/
99-
export function getEsVersionForFileName(
100-
scriptTarget: ScriptTarget | undefined,
101-
esVersionInFileName = false,
102-
): string {
103-
if (!esVersionInFileName || scriptTarget === undefined) {
104-
return '';
105-
}
106-
107-
if (scriptTarget === ScriptTarget.ESNext) {
108-
return '-esnext';
109-
}
110-
111-
return '-' + ScriptTarget[scriptTarget].toLowerCase();
112-
}
113-
11495
export function isPolyfillsEntry(name: string): boolean {
11596
return name === 'polyfills';
11697
}

0 commit comments

Comments
 (0)