mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 10:33:43 +08:00
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
This commit is contained in:
parent
3f94b2d8ba
commit
7f67c64be1
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user