Michael added a comment.

  In T233305#5579153 <https://phabricator.wikimedia.org/T233305#5579153>, 
@Lucas_Werkmeister_WMDE wrote:
  
  > I couldn’t figure out how to make it part of the app module, but extracting 
the dispatcher into a separate module reduces the size of the init module 
substantially:
  >
  >   [...]
  >   diff --git a/client/resources/Resources.php 
b/client/resources/Resources.php
  >   index 9c9a0e0f2..085d2bccd 100644
  >   --- a/client/resources/Resources.php
  >   +++ b/client/resources/Resources.php
  >   @@ -66,6 +66,24 @@
  >                     }
  >             ],
  >   +         'wikibase.client.data-bridge.dispatcher' => [
  >   +                 'factory' => function () {
  >   +                         $clientSettings = 
WikibaseClient::getDefaultInstance()->getSettings();
  >   +                         return new ResourceLoaderFileModule(
  >   +                                 [
  >   +                                         'scripts' => [
  >   +                                                 'dispatcher.common.js'
  >   +                                         ],
  >   +                                         'targets' => 
$clientSettings->getSetting( 'dataBridgeEnabled' ) ?
  >   +                                                 [ 'desktop', 'mobile' ] 
:
  >   +                                                 [],
  >   +                                         'remoteExtPath' => 
'Wikibase/client/data-bridge/dist',
  >   +                                 ],
  >   +                                 __DIR__ . '/../data-bridge/dist'
  >   +                         );
  >   +                 },
  >   +         ],
  >   +
  >             'wikibase.client.data-bridge.app' => [
  >                     'factory' => function () {
  >                             $clientSettings = 
WikibaseClient::getDefaultInstance()->getSettings();
  >
  > [...]
  
  Tried it out and I think this direction is promising.  But I'm not sure 
whether this is another of those global Resource Loader modules that are 
currently trying to reduce or not? Though maybe the discussion about extracting 
the dispatcher should happen in its own (sub-) ticket?

TASK DETAIL
  https://phabricator.wikimedia.org/T233305

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE, Michael
Cc: Lucas_Werkmeister_WMDE, Michael, Aklapper, Lydia_Pintscher, darthmon_wmde, 
DannyS712, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, 
_jensen, rosalieper, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to