Skip to content
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

Rollup is injecting JS not supported by IE11 (is IE11 supported?) #3784

Closed
GordonSmith opened this issue Sep 17, 2020 · 4 comments · Fixed by #4215
Closed

Rollup is injecting JS not supported by IE11 (is IE11 supported?) #3784

GordonSmith opened this issue Sep 17, 2020 · 4 comments · Fixed by #4215

Comments

@GordonSmith
Copy link

GordonSmith commented Sep 17, 2020

Expected Behavior

RollupJS should not inject JS which is unsupported by IE11

Actual Behavior

RollupJS is injecting Object.assign which is not supported in IE11

Generated code which includes Object.assign:

var _colorbrewer = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), colorbrewer$1, {
    'default': colorbrewer$1
}));
@GordonSmith GordonSmith changed the title Is IE11 Supported? Rollup is injecting JS not supported by IE11 (is IE11 supported?) Sep 17, 2020
@GordonSmith
Copy link
Author

GordonSmith commented Sep 17, 2020

FWIW, this is what tslib (typescript) uses to solve the same issue -

var __assign = function() {
    __assign = Object.assign || function __assign(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};

@shellscape
Copy link
Contributor

I'd recommend injecting a polyfill into the bundle where needed, easily remedied from your end.

IE11 is end of life next year and the list of sites no longer supporting it is growing exponentially. Best to prepare now for no one supporting it in 11 months.

@GordonSmith
Copy link
Author

@shellscape - while I agree with your sentiment re IE11, I am hitting this issue as both a consumer of bundles as well as a creator of bundles.

FWIW I have added pollyfills to code that I have control over and was simply reporting the issue here in an effort to help (I was a bit surprised to not see a similar report, or documentation saying IE11 no longer supported as of v2 etc.).

@lukastaegert
Copy link
Member

This will finally be resolved in #4215

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants