Since v1.2.2, running ng test
with source maps enabled (default) makes some bundles be loaded two times more through XHR under Chrome only
#7525
Labels
needs: investigation
Requires some digging to determine if action is needed
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
severity1: confusing
type: bug/fix
Bug Report or Feature Request (mark with an
x
)Versions.
Repro steps.
To reproduce the issue, run
ng test
on a project freshly generated by the CLI and make sure--sourcemap
is enabled and that you are testing it with Chrome. Then open the developer tools and check the network panel.The following files are all loaded three times (once through a script inclusion and then twice through XHR):
inline.bundle.js
vendor.bundle.js
main.bundle.js
These are all bundles. Those additional bundles though don't suffer from this problem:
polyfills.bundle.js
scripts.bundle.js
The log given by the failure.
Desired functionality.
The three bundles above should be loaded only once, through script inclusion, and not at all through XHR.
Mention any other details that might be useful.
I investigated a bit more and identified commit
19f04af0777391cc72d096a0e315fe87bab161c6
as the one introducing the bug. The content changed in this commit is fairly simple, and you'll notice it concerns the source maps feature. I quickly tested removing those lines inpackages/@angular/cli/plugins/karma.ts
:karma-source-map-support
After removing those lines the bug disappears (even if I guess the source maps feature doesn't work a s expected after that.)
The text was updated successfully, but these errors were encountered: