Replies: 3 comments 6 replies
-
@chocolata, I'm not sure this is a Boxes issue since these tags are generated by October. This means you should have the same output for any other plugin that uses October's asset pipeline. |
Beta Was this translation helpful? Give feedback.
-
I can confirm that attributes are indeed possible via the combiner.... $this->addCss("['/plugins/velitalia/racescraper/assets/css/races.css']", [
'preload' => true,
'foo' => 'bar'
]); The second argument provides attributes that as passed to <link src="..." preload="true" foo="bar" /> However, we don't include the |
Beta Was this translation helpful? Give feedback.
-
Hi Sam, being able to add the .css or .js extension globally would, as far as I'm concerned, certainly be a great solution. I didn't know that addCss had these options. Thanks for letting us know! |
Beta Was this translation helpful? Give feedback.
-
Hi,
I was evaluating the Boxes plugin and found it very useful, but I hit some minor details that I was able to do in my own setup and am unable to achieve as of yet with the Boxes plugin.
Right now, if we use the combiner function, the Boxes plugin injects such a line of code for the CSS:
<link rel="stylesheet" href="http://localhost:8086/combine/5a238af5103270a4359a6a0781d26f6c-1730928331">
Can we have the option to modify this line slightly, so we can preload the CSS as is suggested here:
https://web.dev/articles/preload-critical-assets
I used to preload CSS as follows:
Additionally, I see that if we use the bundle function (thank you for this, I rely heavily on this), the combiner spits out a URL without a CSS suffix, which causes issues regarding caching, because the browser does not detect it as CSS.
So it would be ideal if we could achieve something like this:
Could you kindly review if this is feasible or possible? If there are alternatives to reach something similar, I am of course open to that.
Thanks for your work.
Beta Was this translation helpful? Give feedback.
All reactions