HomeElementl

[dagit] Split the bundle

Description

[dagit] Split the bundle

Summary:
Stacked on https://dagster.phacility.com/D7418.

A handful of changes to enable (and take the first couple steps in) bundle splitting.

  • Use __webpack_public_path__ to set a path prefix dynamically. This will be used for all dynamically loaded bundles. The file that sets this value must be the first import in the entry file. I added comments to that effect.
  • Change how we set the path prefix in the DOM. This approach is more in line with how we're handling other preloaded values.
  • Split InstanceRoot and WorkspaceRoot as a first step. This ensures that the approach works, and is a reasonable first place to split the bundle anyway.

Test Plan:
yarn build-for-python.

  • Run Dagit with no path prefix, navigate to pages throughout Dagit. Verify that everything loads, and that bundle chunks load properly.
  • Run Dagit with path prefix, verify same.

Run Dagit for development, verify same.

Reviewers: bengotow, prha, sashank

Reviewed By: prha

Differential Revision: https://dagster.phacility.com/D7423

Details

Provenance
dishAuthored on Apr 14 2021, 1:41 AM
Reviewer
prha
Differential Revision
D7423: [dagit] Split the bundle
Parents
R1:8bfebf989579: [dagit] Eject CRA
Branches
Unknown
Tags
Unknown