Open usergenic opened 7 years ago
/**
* If true, the imported document may not be loaded until well after the
* containing document has been evaluated, and indeed may never load.
*/
^ https://github.com/Polymer/polymer-analyzer/blob/master/src/model/import.ts#L54
Hm, this seems like a mistake/bug to me. The stylesheet unconditionally loads when its containing document loads.
I think it should not be lazy.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
According to https://github.com/Polymer/polymer-analyzer/blob/master/src/html/html-style-scanner.ts#L54 we mark all html stylesheet links as "lazy" imports.
What is intended by this? Anywhere we care about the non-lazy html import graph and the related assets like css+js, I filter imports based on
!lazy
to exclude lazy-import type html imports, but maybe I have to be more specific now to only care aboutfilter((i) => !(type==='html-import' && lazy===true)
?I found this when I getFeatures all imports and inspect their lazy property. Investigating as part of fix for https://github.com/Polymer/polymer-cli/issues/749