Skip to content

Commit 195e493

Browse files
alan-agius4Keen Yee Liau
authored and
Keen Yee Liau
committed
fix(@angular-devkit/build-angular): various breakpoints issues
With this change we address 2 main issues related to unbound breakpoints: 1) in VS code when having a `baseHref` set. 2) Visual Studio when using an SPA inside a ASP.NET project For the latter, it seems that there is no way to set a `webRoot`. However, `webpack:///` seems to be handled internally and will be mapped to the `SpaRoot` ie `ClientApp` folder. Fixes: #15211
1 parent 804c11d commit 195e493

File tree

1 file changed

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

1 file changed

+5
-0
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ export function getSourceMapDevTool(
9393
return new SourceMapDevToolPlugin({
9494
filename: inlineSourceMap ? undefined : '[file].map',
9595
include,
96+
// We want to set sourceRoot to `webpack:///` for non
97+
// inline sourcemaps as otherwise paths to sourcemaps will be broken in browser
98+
// `webpack:///` is needed for Visual Studio breakpoints to work properly as currently
99+
// there is no way to set the 'webRoot'
100+
sourceRoot: inlineSourceMap ? '' : 'webpack:///',
96101
moduleFilenameTemplate: '[resource-path]',
97102
append: hiddenSourceMap ? false : undefined,
98103
});

0 commit comments

Comments
 (0)