Skip to content

Commit 7b18978

Browse files
clydinalan-agius4
authored andcommitted
refactor(@angular-devkit/build-angular): remove core path usage from normalizeExtraEntryPoints helper
The Node.js `path` builtin module is already imported and provides the necessary functionality to extract the base file name needed within this helper function. By using `path`, all imports from `@angular-devkit/core` can be eliminated from the file.
1 parent 2a1f4ee commit 7b18978

File tree

1 file changed

+1
-2
lines changed
  • packages/angular_devkit/build_angular/src/webpack/utils

1 file changed

+1
-2
lines changed

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { basename, normalize } from '@angular-devkit/core';
109
import * as path from 'path';
1110
import { ScriptTarget } from 'typescript';
1211
import { Configuration, SourceMapDevToolPlugin } from 'webpack';
@@ -57,7 +56,7 @@ export function normalizeExtraEntryPoints(
5756
bundleName = entry.bundleName;
5857
} else if (!inject) {
5958
// Lazy entry points use the file name as bundle name.
60-
bundleName = basename(normalize(entry.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')));
59+
bundleName = path.parse(entry.input).name;
6160
} else {
6261
bundleName = defaultBundleName;
6362
}

0 commit comments

Comments
 (0)