Move `adjustConnectionOptionsBeforeConnect` from connection-form into a new package

XMLWordPrintableJSON

    • 3
    • None
    • Developer Tools

      The VSCode extension uses the `adjustConnectionOptionsBeforeConnect` function from `connection-form` when connecting in the main extension as it requires as similar connection flow. By having it in the connection-form we're unintentionally adding large frontend dependencies to the bundle and also slowing down startup time. (compass-components, and compass-editor are the main ones as they pull in leafygreen, code-mirror, and prettier, which add a lot).

      We should move this `adjustConnectionOptionsBeforeConnect` to a new place, I'm thinking either connection-info, or a new package, something like connection-utils.

      Before / after webpack excluding these dependencies screenshots attached. This method won't work since it'll give runtime errors.

      Before:

      After:

        1. Screenshot 2024-08-09 at 1.56.36 PM.png
          746 kB
          Rhys Howell
        2. Screenshot 2024-08-09 at 1.56.36 PM-1.png
          746 kB
          Rhys Howell
        3. Screenshot 2024-08-09 at 1.51.20 PM.png
          1.16 MB
          Rhys Howell

              Assignee:
              Unassigned
              Reporter:
              Rhys Howell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: