Skip to content

Commit 780c82d

Browse files
amakhrovfilipesilva
authored andcommitted
fix(@angular-devkit/build-angular): better handle relative paths with bundleDependencies=false
When `bundleDependencies` is turned off, webpack only bundles modules imported via relative path. Existing check works well for import paths like `'./some/file'`, but fails for imports traversing the dir structure up, like `'../some/file'`.
1 parent a3637af commit 780c82d

File tree

1 file changed

+1
-1
lines changed
  • packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs

1 file changed

+1
-1
lines changed

packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function getServerConfig(wco: WebpackConfigOptions): Configuration {
5353
...externalDependencies,
5454
(context: string, request: string, callback: (error?: null, result?: string) => void) => {
5555
// Absolute & Relative paths are not externals
56-
if (request.startsWith('./') || isAbsolute(request)) {
56+
if (request.startsWith('.') || isAbsolute(request)) {
5757
callback();
5858

5959
return;

0 commit comments

Comments
 (0)