fature/bug: databaseless facade on server-side mongoose #8237
Labels
refactor
This is a purely internal change for making Mongoose internals easier to understand and work with
Milestone
Do you want to request a feature or report a bug?
feature
but in reality it's a little bit from column A, a little bit from column B
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
server-side behaves the same way as client-side (i.e. doesn't crash)
tl;dr from below - requresting something like this that works on both normal mongoose and mongoose/browser:
I know it sounds silly to want this on the server-side, but SSR is the motivation. While working on the PR for #7219 I realized that when replacing references to my own 'wb-mongoose-browser' module with 'mongoose' itself, all the sudden I got that error above.
This is because on the SSR build, even though the codebase is using browser syntax, webpack grabs the normal mongoose instead of the 'browser' key in package.json (it targets 'node' after all). As a workaround, you can use resolve.alias in webpack, but it would be much nicer if it wasn't necessary.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
node 10, mongoose master
The text was updated successfully, but these errors were encountered: