Skip to content

Proof of Concept: Replace frontend dispatcher with directory-based code splitting

Mike Greiling requested to merge 37792-dispatcher-refactor-poc into master

This is a proof of concept for #37792 (closed) to replace the dispatcher.js with entry points automatically generated based on a directory structure within /app/assets/javascripts/pages.

This will be done in two parts:

  1. the dispatcher code will be amended to dynamically include scripts within this magic directory structure based on the current route being served.
  2. the webpack config will be updated to automatically generate its entries, the rails/webpack integration will be updated to automatically include these entry points, and the dynamic imports within dispatcher.js will be removed in favor of these.

/cc @jschatz1

Edited by Mike Greiling

Merge request reports