-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Wrap babel-runtime@^6 dependency #660
Comments
I would just as soon see this fixed in As you mention, this doesn't help if users need Also, it's not quite so trivial as wrapping // unfortunately, our wrapper won't be this simple
module.exports = require('babel-runtime');
Here are the first few transpiled lines of var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"];
var _Object$create = require("babel-runtime/core-js/object/create")["default"];
var _Symbol = require("babel-runtime/core-js/symbol")["default"];
var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"];
var _interopRequireWildcard = require("babel-runtime/helpers/interop-require-wildcard")["default"]; We definitely could do this ourselves (and if the babel team decides they won't, that will be our only option). I just think fixing it in babel would be easier and better for the community at large. |
Agreed. Let's keep this open so we don't forget to follow-up with Babel. We can discuss doing this if they don't fix it in the short-term. |
@jamestalmage ah hadn't looked into it that deeply. Yikes. |
Looks like babel/babel#3438 will solve our |
Merged babel/babel#3438 and released in 6.8.0 |
Awesome. I just tried it out on a random project, and it "feels" faster (could be placebo effect though). Have you done any profiling with the change? |
No, I haven't - we had some discussions on how we could reliably do that but I'm not sure if we came up with anything since running a benchmark on travis didn't seem to be a good idea given the variance. I think it "felt" faster to me too lol |
Many Babel dependencies depend on
babel-runtime@^5
. AVA depends onbabel-runtime@^6
. Often this leads to npm not deduping thebabel-runtime@^5
dependency, causing install size to balloon.#400 rewrites
babel-runtime
require statements in the transpiled test files to absolute paths. This would allow us to wrapbabel-runtime@^6
in an intermediate package, sayava-babel-runtime
. npm may then be more likely to dedupebabel-runtime@^5
.Of course this would only apply to AVA itself. Other dependencies may be introduced by consuming packages which cause
babel-runtime@^6
to not be deduped. Whether this will impact real world install size is to be determined. See #369.The text was updated successfully, but these errors were encountered: