Open darrnshn opened 4 years ago
Please describe the problem, which this feature would resolve?
We have some assets that we would like to include in our test HTML page. We need to set the preload
attribute on those includes. Because of this, we cannot use Karma config to include these assets automatically anymore, we have to manually inject the assets into the test page via JS.
Can you provide an example? Are we talking about rel="preload"
? AFAICT it is a purely performance thing and should not prevent you from including assets? Or am I missing something?
You can also use type="dom"
in files
configuration to include arbitrary content into the test page.
Thanks, yes I was referring to rel="preload". It should be a pure performance thing.
We can use type="dom" for a workaround.
Karma config allows you to specify
included=true
to let karma include the asset for you. It would be great if karma also allowed you to optionally specify that the include should have thepreload
attribute.