Proof of Concept: Replace frontend dispatcher with directory-based code splitting
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:
- the dispatcher code will be amended to dynamically include scripts within this magic directory structure based on the current route being served.
- 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