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

error in IE11 with "internals/well-known-symbol.js" #513

Closed
scrollbar-ww opened this issue Mar 25, 2019 · 9 comments
Closed

error in IE11 with "internals/well-known-symbol.js" #513

scrollbar-ww opened this issue Mar 25, 2019 · 9 comments

Comments

@scrollbar-ww
Copy link

version: [email protected]

"internals/fix-regexp-well-known-symbol-logic.js":
line: 8
var SPECIES = wellKnownSymbol('species')
this "wellKnownSymbol" method got wrong.

"internals/well-known-symbol.js":

module.exports = function (name) {
  return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name]
    || (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};

there's no global Symbol, and "NATIVE_SYMBOL" is "true"

@scrollbar-ww
Copy link
Author

upgrade to [email protected], in my bundled js file,there're these "Symbol" stuff,but not exist @v2.6.5

more configuration files:
"babel.config.js":

module.exports = {
  presets: [
    [
      '@babel/preset-env',
      {
        modules: false,
        useBuiltIns: 'usage',
        corejs: 3
      }
    ]
  ]
}

".browserslistrc"

chrome >= 50
firefox >= 50
ie >= 10

@zloirock
Copy link
Owner

there's no global Symbol, and "NATIVE_SYMBOL" is "true"

I have no ideas in which case it's possible - without global Symbol, NATIVE_SYMBOL can't be true. Could you add a simple reproducible example?

@somebody32
Copy link

Not sure if better is to open a new issue or piggyback on that one but I too have issues in IE11 trying to upgrade to core-js 3.

The error is Exception thrown and not caught, is caused by internals/internal-state.js line 26 because !isObject(it) returns true.

I've started with just plain import "core-js/stable" but managed to pin it down to import "core-js/es/symbol".

Where should I look to provide more data about the issue? Thanks in advance!

@zloirock
Copy link
Owner

@somebody32 seems it's another issue. Could you open it and provide more data / a reproducible example?

@somebody32
Copy link

@zloirock thanks, done #514

klarstrup pushed a commit to tjek/verso-browser that referenced this issue Mar 26, 2019
klarstrup pushed a commit to tjek/tjek-js-sdk that referenced this issue Mar 27, 2019
@zloirock
Copy link
Owner

zloirock commented Mar 27, 2019

@scrollbar-ww are you sure that core-js is not transpiled by babel? It could be one of the reasons for this issue.

@scrollbar-ww
Copy link
Author

scrollbar-ww commented Mar 30, 2019

i am using rollup & rollp-plugin-babel plugin for bundling my project,here's the plugin args:

const babelPlugin = require('rollup-plugin-babel')
// ...
babelPlugin({
  exclude: [/\/core-js\//],
  externalHelpers: true
})

@alippai
Copy link

alippai commented Apr 2, 2019

Rollup treeshakes the following:

// Chrome 38 Symbol has incorrect toString conversion
module.exports = !require('../internals/fails')(function () {
  // eslint-disable-next-line no-undef
  String(Symbol());
});

into:

// Chrome 38 Symbol has incorrect toString conversion
module.exports = !require('../internals/fails')(function () {
});

Which evaluates to true

@zloirock
Copy link
Owner

zloirock commented Apr 3, 2019

Interesting. Seems it's a rollup issue, could you create it in their repo? I can add a workaround to core-js.

nicketson added a commit to turbobridge/core-js that referenced this issue Apr 25, 2019
rollup treeshaking is removing the Object.getOwnPropertyNames
FAILS_ON_PRIMITIVES feature test.

This is related to these rollup issue
rollup/rollup#1771
rollup/rollup#2790

Related issue and fix
zloirock#513
zloirock@f813c4e
nicketson added a commit to turbobridge/core-js that referenced this issue Apr 26, 2019
rollup treeshaking is removing the Object.getOwnPropertyNames
FAILS_ON_PRIMITIVES feature test.

This is related to these rollup issue
rollup/rollup#1771
rollup/rollup#2790

Related issues
zloirock#494
zloirock#513
klarstrup pushed a commit to tjek/tjek-js-sdk that referenced this issue Apr 26, 2023
klarstrup pushed a commit to tjek/tjek-js-sdk that referenced this issue Apr 26, 2023
klarstrup added a commit to tjek/tjek-js-sdk that referenced this issue Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants