Skip to content

Instantly share code, notes, and snippets.

@gheydon
Last active September 21, 2023 02:39
Show Gist options
  • Save gheydon/2bb22945fd1244d9b609c603490ae2e6 to your computer and use it in GitHub Desktop.
Save gheydon/2bb22945fd1244d9b609c603490ae2e6 to your computer and use it in GitHub Desktop.
Add the following to turn off Drupal 10.1+ Lazy Loading of agreggated CSS and JS. This is depreciated and will be removed in Drupal 11.
services:
asset.css.collection_optimizer:
class: Drupal\Core\Asset\CssCollectionOptimizer
arguments: [ '@asset.css.collection_grouper', '@asset.css.optimizer', '@asset.css.dumper', '@state', '@file_system' ]
asset.js.collection_optimizer:
class: Drupal\Core\Asset\JsCollectionOptimizer
arguments: [ '@asset.js.collection_grouper', '@asset.js.optimizer', '@asset.js.dumper', '@state', '@file_system']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment