Uploaded image for project: 'stripes-core'
  1. stripes-core
  2. STCOR-26

Async module loading

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open (View Workflow)
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Template:
    • Development Team:
      Core: Platform

      Description

      It is important that we be able to leverage Webpack's "code splitting" feature. It creates bundles of code that are loaded on an as-needed basis.

      http://webpack.github.io/docs/code-splitting.html

      The alternative is to bundle every dependency for the entire application in one file to be loaded up front. This is problematic as it would entail, for example, the charting library used by the acquisitions module being downloaded before a patron could be viewed. Indeed, it would be needed even to display the login screen.

      Before STRIPES-24 we were able to implement this with the getComponent() callback in the react-router v2 API. react-router v4 does not currently supply a direct equivalent, instead, one must implement it oneself:
      https://gist.github.com/acdlite/a68433004f9d6b4cbc83b5cc3990c194
      http://blog.netgusto.com/asynchronous-reactjs-component-loading-with-webpack/

      Or include another dependency (this does not seem widely adopted yet):
      https://github.com/jtmthf/react-router-match-async

      Since this is not something that affects the API exposed to module authors I'm not tackling it right now. Especially as v4 is still in alpha and subject to change. Additionally, we may as well wait until we move to Webpack 2.

      Definitely something essential for MVP though.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jason Jason Skomorowski
                Reporter:
                jason Jason Skomorowski
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Time Spent - 4 hours, 30 minutes Remaining Estimate - 3 hours, 30 minutes
                    3h 30m
                    Logged:
                    Time Spent - 4 hours, 30 minutes Remaining Estimate - 3 hours, 30 minutes
                    4h 30m

                      TestRail: Runs

                        TestRail: Cases