Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-6670

Native packages fail to bundle in webpack

    • 3
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Use Case

      As a... webpack bundle user
      I want... bundle code that uses native packages
      So that... I can still run bundled code in Node.js

      User Experience

      • What is the desired/expected outcome for the user once this ticket is implemented?
      • webpack doesn't fail to build the driver with native extensions

      Dependencies

      Risks/Unknowns

      • What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
      • Is there an opportunity for better cross-driver alignment or testing in this area?
        • No
      • Is there an opportunity to improve existing documentation on this subject?
        • Probably, but more likely it would be better captured by a test.

      Acceptance Criteria

      Implementation Requirements

      • Make sure the use of require for the native build is inside a try-catch block.
        • zstd, mongodb-client-encryption, kerberos

      Testing Requirements

      • Try bundling the native packages or the driver or both to try and catch errors (we have done this in BSON)

      Documentation Requirements

      • None

      Follow Up Requirements

      • We may defer adding testing in our projects as long as we unblock the internal projects that can verify webpack is fixed by the change for this ticket.

        There are no Sub-Tasks for this issue.

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: