Closed (fixed)
Project:
JS delay load
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 May 2020 at 19:19 UTC
Updated:
7 Jun 2020 at 19:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
vdsh commentedI think the use case is broader than that: we should be able to optimize differently depending on contexts.
Eg: a leaflet map could be critical on one node type and not so important on another one.
To achieve this, we would need to change configuration from simple configuration to configuration entities and create a "context selection" as well as an associated "context configuration"
That way we can have a default configuration for all the site or finetune it per context (or a mix of both: default configuration for most pages but on a specific page a different configuration)
Comment #3
vdsh commentedThis is now possible with latest 2.0.x dev (and will be available in release 2.0). You can define your strategies and then use an event subscriber to the StrategiesOrderAlter::EVENT_NAME event to disable some strategy on admin path or to use a specific one.
Comment #4
vdsh commentedAttached is the full event subscriber example as a txt file
Comment #5
vdsh commentedWith the 2.0.1 version, you can also use Rules to do this, see #3139144: Prioritize strategies with Rules