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-runtime/helpers/typeof requires itself - again #4829
Comments
This same issue also happens when transpiling a JSPM (0.17.0-beta.22) project with babel and rollup. Haven't been able to figure out why, so far. |
I was running into the same problem, and spent most of yesterday trying to fix it. Turns out, if you just add import json from 'rollup-plugin-json';
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
export default {
entry: 'node_modules/babel-runtime/helpers/typeof.js',
format: 'cjs',
plugins: [
json(),
babel({ runtimeHelpers: true, exclude: 'node_modules/**' }),
nodeResolve({ jsnext: true, main: true }),
commonjs()
],
dest: 'bundle.js'
}; |
Seems like this issue is related to |
@chicoxyzzy running This seems to be the problematic code (at the very beginning of the function) var babelHelpers = global;
babelHelpers.typeof = typeof Symbol === "function" && babelHelpers.typeof(Symbol.iterator) === "symbol" ? function (obj) {
return typeof obj === "undefined" ? "undefined" : babelHelpers.typeof(obj);
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : babelHelpers.typeof(obj);
}; |
|
This issue happens again, in babel-runtime 6.11.6 when using rollup.
This is
rollup.config.js
to reproduce:Related: #3711, rollup/rollup-plugin-babel#97
The text was updated successfully, but these errors were encountered: