We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
/** * 最小可复现代码说明: * webpack 不用任何 loader * core-js 使用的版本号是 2.6.9 */ // vconsole: https://github.com/Tencent/vConsole/blob/v3.3.2/src/lib/symbol.js // 原代码做了判断 Symbol 是否存在,这里是为了在所有浏览器中都能复现这个 bug 才去掉 if 的判断 window.Symbol = function _Symbol() {} // 下面两个 require 顺序不能换(比较奇葩哈,所以这个 bug 不是必现) // 在正常的开发中,下面两行代码是被 babel-loader 引入的 require('core-js/modules/es6.regexp.replace') require('core-js/modules/es6.regexp.split') var base = 'abc' base = base.replace(/a/, '1') // 返回的结果是: [""] base = base.replace('b', '2') // 由于 base 已经不是字符串,所以这里会报错 document.body.innerHTML = base
The text was updated successfully, but these errors were encountered:
正常情况下,这个 bug 只有在不支持 Symbol 的浏览器,并且 babel 处理后的代码中正好有上面两个 require 才会出现
使用上面的代码,可以让这个 bug 在所有浏览器中必现
Sorry, something went wrong.
fix: Remove Symbol, Array.from polyfill. (issue #325, #275)
Symbol
Array.from
fb5e825
bec5af3
No branches or pull requests
The text was updated successfully, but these errors were encountered: