Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): fixes cors issues with karma (#11970
Browse files Browse the repository at this point in the history
)

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
  • Loading branch information
alan-agius4 authored and vikerman committed Aug 29, 2018
1 parent 897cc71 commit b4f35b7
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -144,6 +144,7 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => {
// Files need to be served from a custom path for Karma.
webpackConfig.output.path = '/_karma_webpack_/';
webpackConfig.output.publicPath = '/_karma_webpack_/';
webpackConfig.output.devtoolModuleFilenameTemplate = '[namespace]/[resource-path]?[loaders]';

let compiler: any;
try {
Expand Down

0 comments on commit b4f35b7

Please sign in to comment.