Created
February 2, 2021 17:33
-
-
Save stolinski/b60484177dd4810335c8363c2a97ff1e to your computer and use it in GitHub Desktop.
Patch to fix mongoose for esbuild
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/mongoose/lib/index.js b/node_modules/mongoose/lib/index.js | |
index 1425cfa..631eba5 100644 | |
--- a/node_modules/mongoose/lib/index.js | |
+++ b/node_modules/mongoose/lib/index.js | |
@@ -732,19 +732,19 @@ Mongoose.prototype.connections; | |
* Driver dependent APIs | |
*/ | |
-const driver = global.MONGOOSE_DRIVER_PATH || './drivers/node-mongodb-native'; | |
+ | |
/*! | |
* Connection | |
*/ | |
-const Connection = require(driver + '/connection'); | |
+const Connection = require('./drivers/node-mongodb-native/connection'); | |
/*! | |
* Collection | |
*/ | |
-const Collection = require(driver + '/collection'); | |
+const Collection = require('./drivers/node-mongodb-native/collection'); | |
/** | |
* The Mongoose Aggregate constructor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment