Skip to content
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

[FR] In ESM, export all common modules as modules under @feathersjs/feathers #2766

Closed
FossPrime opened this issue Sep 28, 2022 · 1 comment
Closed

Comments

@FossPrime
Copy link
Member

FossPrime commented Sep 28, 2022

For ES Module users, we could, for free, expose all common feathers server dependencies as ES Module exports under package.json. CommonJs users would be unaffected, but module users could drop their dependency count and improve DX by not having to run install as often if they want oauth, sockets or schema for instance. It also makes managing our package.json easier, and updating feathers is a single line affair, rather then a 10 line commit every time.

Again, this is free real state, it would not have any runtime overhead. 200K extra of hard drive space is negligible in a server context, even in the most frugal environments Feathers runs on.

The only downside is it soft-locks us into supporting a module for future versions... but I don't see socketio, oauth, adapter-commons or any of the top 8 modules non-express modules going away in the relevant future.

I could make a PR and ReplIt sandbox to show this in action if this sounds good to everyone.

p.s. I think we should do to Koa/Socket.io what Laravel/Vite did to Symphony/Roll-up.

Related (this would have been another package): #2522


Having @feathersjs/server, @feathersjs/common, or @feathersjs/omnibus would be just as convenient while keeping reproduction sizes small and protecting the bundle size of exotic or ancient client side bundlers.

@FossPrime
Copy link
Member Author

Abandoned in favor of #2748

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant