Skip to content

Commit 7f67c64

Browse files
alan-agius4vikerman
authored andcommittedAug 28, 2018
fix(@angular-devkit/build-angular): fixes cors issues with karma (#11970)
Checking the stack trace in the issue one can noticed that the paths for the components are being served via the `webpack://` protocol which is causing a `cors` issue between `http` and `webpack` protocol This PR removed the `webpack` protocol from the `devtoolModuleFilenameTemplate` Closes #11966
1 parent 3f94b2d commit 7f67c64

File tree

1 file changed

+1
-0
lines changed
  • packages/angular_devkit/build_angular/src/angular-cli-files/plugins

1 file changed

+1
-0
lines changed
 

‎packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => {
144144
// Files need to be served from a custom path for Karma.
145145
webpackConfig.output.path = '/_karma_webpack_/';
146146
webpackConfig.output.publicPath = '/_karma_webpack_/';
147+
webpackConfig.output.devtoolModuleFilenameTemplate = '[namespace]/[resource-path]?[loaders]';
147148

148149
let compiler: any;
149150
try {

0 commit comments

Comments
 (0)