We're currently running V4 for our API and I've been looking into making the change to V5. One of the things that I'm most interested in is the typed client, but I have a couple questions about it that I'm having a hard time answering.
Setup
Setup blank app directly from the docsnpm create feathers@latest feathers-chat
Answer things the same as in the docs
Run cd feathers-chat && npm run bundle:client which indeed creates a bundled package at ./public/feathers-chat-0.0.0.tgz
Question1: Extra Dependencies
If I unzip ./public/feathers-chat-0.0.0.tgz I get a package folder with lib/ and package.json. Looking at the /package.json I see that all the dependencies are included in there, but it seems to me that the client should not depend on things like knex and winston and some of the @feathersjs/package packages. If I install the client in some other project as advertised in the docs with npm install https://myapp.com/appname-x.x.x.tgz (I ran npm install ../feathers-chat/public/feathers-chat-0.0.0.tgz in an adjacent project) I can confirm that all those dependencies were installed via npm why knex etc.
I can manually remove the extraneous dependencies, but if I re-bundle the client I'll have to do that again. So it seems I'd need to write some sort of tooling to automate this.
So my question is, am I missing something here or is this just what's available out of the box. I totally understand if it's the latter, but I want to make sure I'm not missing something here before I start building a custom script to fix this.
Question 2: Separate Package
Additionally we've got everything in a monorepo so I think I'll have to write a script that bundles the client, (maybe strips out some deps) and then stuffs it into it's own package in our /packages/ folder to be used by other apps. Curious if there's any other way to extract the client to be a separate package instead of being part of the main feathers app and then bundling it off. This is kinda a vague question, but mostly curious if you'd had anyone else with a similar issue and could point me in a certain direction.
We're currently running V4 for our API and I've been looking into making the change to V5. One of the things that I'm most interested in is the typed client, but I have a couple questions about it that I'm having a hard time answering.
Setup
Setup blank app directly from the docs
npm create feathers@latest feathers-chat
Answer things the same as in the docsRun
cd feathers-chat && npm run bundle:client
which indeed creates a bundled package at./public/feathers-chat-0.0.0.tgz
Question1: Extra Dependencies
If I unzip
./public/feathers-chat-0.0.0.tgz
I get apackage
folder withlib/
andpackage.json
. Looking at the/package.json
I see that all the dependencies are included in there, but it seems to me that the client should not depend on things likeknex
andwinston
and some of the@feathersjs/package
packages. If I install the client in some other project as advertised in the docs withnpm install https://myapp.com/appname-x.x.x.tgz
(I rannpm install ../feathers-chat/public/feathers-chat-0.0.0.tgz
in an adjacent project) I can confirm that all those dependencies were installed vianpm why knex
etc.I can manually remove the extraneous dependencies, but if I re-bundle the client I'll have to do that again. So it seems I'd need to write some sort of tooling to automate this.
So my question is, am I missing something here or is this just what's available out of the box. I totally understand if it's the latter, but I want to make sure I'm not missing something here before I start building a custom script to fix this.
Question 2: Separate Package
Additionally we've got everything in a monorepo so I think I'll have to write a script that bundles the client, (maybe strips out some deps) and then stuffs it into it's own package in our
/packages/
folder to be used by other apps. Curious if there's any other way to extract the client to be a separate package instead of being part of the main feathers app and then bundling it off. This is kinda a vague question, but mostly curious if you'd had anyone else with a similar issue and could point me in a certain direction.Thanks for any insight you can provide.