-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Babel helper export is wrongly hoisted #2414
Comments
It would be nice to have a little more information.
|
It's systemjs. I don't know why, this happens when I add As I said I don't know how to reproduce this with small sandbox. It fails only in my big app with special case. So I'm asking is rollup able to split consumed files in the middle? My problem is splitted inlined helper which cannot hoist and considered by rollup as hoisted. |
@lukastaegert @guybedford I found how to reproduce bug. Not sure it's exactly same bug though. |
@lukastaegert This just broke my app completely and unconditionally today. I can only remove some pages to fix it. Really annoying problem. |
@lukastaegert I removed all plugins except |
@TrySound it may help if you can share the build output, and do as much as you can to cut down the size of the build by emptying all modules that aren't affecting the issue. |
@guybedford Reduced a lot. Take a look please if you have a time. |
(function () {
'use strict';
function _extends$1() {
_extends$1 = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends$1.apply(this, arguments);
}
var whitelist = ['en', 'fr'];
var versions = whitelist.reduce(function (acc, lng) {
var _extends2;
return _extends({}, acc, (_extends2 = {}, _extends2[lng] = null, _extends2));
}, {});
}()); |
Ok, so this looks like |
There are actually several critical pieces to trigger this:
|
It seems the issue is related to the fact that for the reassignment, a |
Will keep investigating tomorrow. |
Thanks. At least I found a way to fix the issue. I just overrode extends helpers in |
Potential fix at #2502. Could you check if this also fixes the original issue? |
Just tried. Works perfectly. Thank you |
Is rollup able to code split inlined babel helpers?
I got an issue with this. This helper is exported at the top of the chunk with
exports({ e: _extends })
I guess it's inlined helper. Babel distributes babe-runtime with not minified helpers.
Moving
exports({})
to the bottom of the chunk should solve the problem.And I don't know how to reproduce this in small sandbox.
The text was updated successfully, but these errors were encountered: