-
Type: New Feature
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Empty show more show less
Problem Description
The Node.js driver uses
try { require('...') } catch {}
to load optional dependencies. That does not always play well with JS bundlers or other source code transformations, where `require()` may fall back to searching the filesystem instead of the bundle.
It would be nice if the driver provided a way to pass in these dependencies programatically, leaving the actual `require()` call to its consumer.
This could (for example) come in the form of options passed to the MongoClient constructor/connect method, or one or more global functions on the driver exports object itself for storing the modules.
- is related to
-
MONGOSH-476 Make sure that the saslprep warning does not show
- Closed