Closed jobe451 closed 6 years ago
Well, it seems that this is not possible. I added this to my fusion package as a hack to make it possible:
prototype(Carbon.IncludeAssets:File) {
isFile {
renderer = Neos.Fusion:Array {
@process.addTag = Carbon.IncludeAssets:TypeCase {
isCSS.renderer = ${Configuration.setting('Carbon.IncludeAssets.LoadCSSAsynchron') && node.context.live && attributes == 'async' ? '<link rel="preload"' + value + ' as="style" onload="this.rel=\'stylesheet\'" onerror="this.rel=\'stylesheet\'" /><noscript><link rel="stylesheet"' + value + ' /></noscript>' : '<link rel="stylesheet"' + value + ' />'}
}
}
}
}
Hack, maybe because I need have in settings something like this with an async attribute: "rootAsync.css[async]". That async attribute is also added to the sylesheet link. It is quite useless, however, that works just fine.
Good point. I‘ll extend the package with this possibility
Solved with Version 2.0.0
I have 2 css files, one with essential instructions - that I want to load regularly (blocking). One with additions, that I would like to load asynchronously (none-blocking). Is that possible?