-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate server functionality and its heavy dependencies (express-pouchdb) #884
Separate server functionality and its heavy dependencies (express-pouchdb) #884
Comments
Good arguments. Do you think it would be an option to add pouch-server as peer dependency? |
I thought about having a peerDependency, but I wasn't too sure about the effects that'd have on npm/yarn/pnpm. After a quick research, yarn/npm(3+) will just warn you about the absence while npm 1+2 will actually install the dependency. In my opinion, this is acceptable. It will break existing installs though since people with yarn/npm(3+) will need to include it in their dependencies. We should just be aware that we're actually abusing the peerDependencies, and there might be some side effects we do not currently know of. Btw I've seen some discussion about optionalPeerDependencies, but they are unlikely to ever happen. I say, lets go for peerDependencies. |
Let's me think about this some time. Other opinions would be welcomed. |
Hi @bkniffler |
I found another reason to do this: at the end of the dependency chain |
Hey there,
I guess most people will use rxdb without using the server functionallity (could be wrong though). But express-pouchdb is quite heavy and leaving it in dependencies will, for example, cause electron-builder to compile fsevents on each build, since it is used by express-pouchdb or one of its dependencies.
Wouldn't it make sense to allow to opt-out of express-pouchdb/express for rxdb by moving it to to a separate package? Unfortunately I don't see any other way to make installing express-pouchdb optional.
The text was updated successfully, but these errors were encountered: