-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Unable to Babel #2644
Comments
I'm getting "Cannot read property '_' of undefined", which is different but also broken. Which version of Underscore are you using? I'm suspicious that this is related to #2153 which has been fixed in master, but we have not yet shipped a release that includes it. You could try it with the version of Underscore on master (https://github.com/jashkenas/underscore/blob/master/underscore.js) and see if that resolves the issue? Let me know what you find. |
I'm using the version 1.8.3, the latest. Unfortunately, I cannot use the unminified version, because of the "require" methods not supported.
|
Where are you seeing the error with Basically, that "error" might just be Babel trying too hard to be helpful. |
Edited after more research I just noticed... The actual last line of Underscore is to invoke itself with
However after built by Babel, the last line is changed to pass
It seems that in ES6 modules, StackOverflow: How to stop babel from transpiling 'this' to 'undefined' Screenshot from Babel's online interpreter: |
I can't transform underscore.min with Babel. I need it because, with gulp, I merge all files and then process them with babel, but with underscore it returns an error.
You can try it out here: https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015
At the bottom of the right panel an error appears: "u is undefined".
The text was updated successfully, but these errors were encountered: