You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<link href="b.html" rel="import">
<!-- register custom element x-a -->
b.html:
<!-- register custom element x-b -->
When karma generates context.html, it appends all paths with ?sha1. The above config would throw an error where x-b is registered twice, because b.html was loaded twice, once from context.html and once from a.html since the path was different.
Since using HTML imports to resolve dependency is a very common pattern, perhaps karma should not cache bust resources loaded with HTML Imports?
The text was updated successfully, but these errors were encountered:
@morethanreal I see the problem, but I'm not sure if making Karma aware of HTML imports is the best strategy. The thing is that Karma processor would have to scan all the HTML files, parse out URLs to the imports and then exclude those files. It is doable but sounds a bit hairy.
But I think we can make all those things working soothly if partials (imports) are served by Karma but not included by default. This is possible with the syntax for files described here: http://karma-runner.github.io/0.12/config/files.html. In your case it could look something like this:
I hope that this solves the immediate problem but if there are any enhancements that we could add, I would be happy to look into those. Would the above work for you?
Imagine a config that includes
a.html
andb.html
:a.html
:b.html
:When karma generates
context.html
, it appends all paths with ?sha1. The above config would throw an error wherex-b
is registered twice, because b.html was loaded twice, once fromcontext.html
and once froma.html
since the path was different.Since using HTML imports to resolve dependency is a very common pattern, perhaps karma should not cache bust resources loaded with HTML Imports?
The text was updated successfully, but these errors were encountered: