-
Notifications
You must be signed in to change notification settings - Fork 25
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
idea: publish hoodie-client-built: only built files without dependencies #70
Comments
My first reaction to a separate package was rather negative, but after thinking about it I see how it could work. Generally I would want to avoid having a separate package if possible. If I understood you correctly you don't want a separate repo though, right, just publish two packages from this repo? (Huge -1 to a separate repo) Option 1: redefine dependencies as dev + peerDependenciesInclude built files and src files in package. Allow hoodie-server to serve bundle including all dependencies. If app wants to
Option 2: two separate packagesPublish
Option 3: bundle dependencies
As I said before I think it's really cool that hoodie serves a precompiled bundle, but for production we should encourage requiring the source files, to allow browserify/webpack to deduplicate dependencies, and e.g. use babel/babel-lodash to get rid of unused modules. I think we're easily in the multiple hundreds of saved kbs with this. After thinking about this now I'm preferring # 3. It think it would be super cool to have While doing this it would make sense to think about using the # 1 approach for all dependencies of hoodie-client, i.e. move all their current bigger dependencies to dev/peerDependencies and install e.g. a single Edit: top-level hoodie already bundles dependencies, so # 3 is pretty much already in effect, just on a different level. |
Hoodie only needs the built version, it does not browserify hoodie-client on the fly. So how about we create another npm package which only has the built files and no dependencies or other code, to speed up the
npm install
for hoodie and reduce dependencies?@boennemann what do you think?
The text was updated successfully, but these errors were encountered: