zloirock / core-js

Standard Library
MIT License
24.39k stars 1.65k forks source link

IE11 - "out of stack space" - caused by Symbol polyfill #849

Closed basher closed 4 years ago

basher commented 4 years ago

I did read the other IE11 stack issues, but none appear to be caused by this code:

ie11-symbol-error

I'm using Parcel2 to bundle, not Webpack.

Version of core-js = 3.6.4.

Here are important bits from my package.json:

{
    "dependencies": {
        "css-vars-ponyfill": "^2.1.2",
        "domready": "^1.0.8",
        "hoverintent": "^2.2.1",
        "intersection-observer": "^0.10.0",
        "mdn-polyfills": "^5.20.0",
        "svg4everybody": "^2.1.9",
        "what-input": "^5.2.7",
        "whatwg-fetch": "^3.0.0"
    },
    "devDependencies": {
        "@storybook/addon-a11y": "^5.3.14",
        "@storybook/addon-docs": "^5.3.14",
        "@storybook/addon-knobs": "^5.3.14",
        "@storybook/html": "^5.3.14",
        "@types/jquery": "^3.3.33",
        "@typescript-eslint/eslint-plugin": "^2.21.0",
        "@typescript-eslint/parser": "^2.21.0",
        "autoprefixer": "^9.7.4",
        "babel-loader": "^8.0.6",
        "colors": "^1.4.0",
        "eslint": "^6.8.0",
        "eslint-config-airbnb-base": "^14.0.0",
        "eslint-config-prettier": "^6.9.0",
        "eslint-plugin-import": "^2.20.0",
        "eslint-plugin-prettier": "^3.1.2",
        "husky": "4.2.1",
        "lint-staged": "^10.0.2",
        "parcel": "^2.0.0-nightly.264",
        "postcss-dir-pseudo-class": "^5.0.0",
        "postcss-logical": "^4.0.2",
        "prettier": "1.19.1",
        "react": "^16.13.1",
        "react-is": "^16.13.0",
        "rimraf": "^3.0.1",
        "sass": "^1.25.0",
        "sass-export": "^1.0.6",
        "stylelint": "^13.0.0",
        "stylelint-config-prettier": "^8.0.1",
        "stylelint-config-recommended-scss": "^4.1.0",
        "stylelint-order": "^4.0.0",
        "stylelint-prettier": "^1.1.2",
        "stylelint-scss": "^3.13.0",
        "typescript": "^3.8.2"
    },
    "browserslist": [
        "defaults"
    ],
    "targets": {
        "app": {}
    }
}   

Here are all the polyfills I'm using in my entry point:

import 'core-js/es/array/from';
import 'core-js/es/string/starts-with';
import 'core-js/es/symbol';
import 'core-js/es/symbol/iterator';
import 'intersection-observer';
import 'mdn-polyfills/Node.prototype.prepend';
import 'whatwg-fetch';
import cssVars from 'css-vars-ponyfill';
import svg4everybody from 'svg4everybody';
basher commented 4 years ago

I've resolved my issue.

I didn't actually need import 'core-js/es/symbol'; so I have removed it. I only need import 'core-js/es/symbol/iterator';.