-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Remove Babel from production dependencies #46
Comments
The whole runtime does not load and run, only the minimal helpers necessary for our level of node support (via |
I see. Still, I wonder why downloading those megabytes is that necessary. Sounds like a small module with just a 100 lines of code, but it brings too much with it.
Usually, small modules try to depend on as less as possible. That's a common practice. |
The runtime dependency has nothing to do with Only two imports in the dist files depend on the runtime dep: The first A downside to making changes like this is that when we want to increase Node.js support to something more recent, we will not easily know what can now be refactored to modern syntax. The best way to maintain a fleet of packages is to use current ES in the source and set up transpilation with While we could manually audit builds and work backwards to remove the need for the runtime dep, this is risky because updating deps, merging PRs, adding features, etc. would require fresh audits.
This is the first I have heard of our install size being a practical issue; are you sure it's a problem? I just installed the dependencies for a minimal server ( Add in a few other dependencies typically used in resolvers (moment, mongodb, etc.) and you can expect many more MB. Proportionally our dependencies are modest, and as more people update to babel@7 lots of packages will be sharing the runtime dep so the overhead due to using it here will be zero. AWS Lambda is horrifically behind the times, by the looks of it even their own SDK is outdated. Ideally they will update their environment to a recent Node.js version sometime soon, then we could move Node.js support right up to v7.6+ or even greater. Then the chances of needing the runtime are small enough to justify removing it from dependencies and transpilation. |
Thank you for the opinion. |
Thanks for the great module!
Not sure if intentional, but
package.json
references the"@babel/runtime": "^7.0.0-beta.39",
.My Lambda (or microservice) definitely do not want that big thing in the memory on on the disk.
Is it removable?
The text was updated successfully, but these errors were encountered: