Is it possible to add "rel=preload"
for all the core Magento CSS files?
I have added that for my custom CSS file.
how can this be added to all the core CSS files for Magento 2.4
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityYou can enable it via admin panel Stores > Settings > Configuration > ADVANCED > Developer or via terminal.
bin/magento config:set dev/css/use_css_critical_path 1
You can create a critical.css in your custom theme as the example below.
app/design/frontend/<your_vendor_name>/<your_theme_name>/web/css/critical.css
Reference: Magento 2.4 DevDocs - CSS critical path