-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
standalone does not work in ES5 #7607
Comments
Hey @arv! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
Node 4.0 is a month of being discontinued so I think that babel will strive to be at least only 6 if not 8. |
@jpsc Babel 7 will likely target Node 6, but this issue is specifically around babel/standalone, which is targeted more at users with ES5 environments since it is often run in browsers. |
Oh okay. Gotcha. 0.10 was just used as an example. |
Yeah that's true, we do want to target ES5 for standalone. I think it's different though, I guess we weren't using polyfillable things like Symbol before? But yeah I don't think standalone would include the polyfill for you unless we have a good way of doing so |
It seems like standalone should bundle babel-runtime? That was honestly my assumption until this was filed. |
babel-standalone should support ES5, we should load any polyfills/runtimes that are required to do so. |
But that means babel is not producing es5 code anymore but using some newer stuff? |
Oh ^ the babel-runtime thing makes sense. I think it's that babel itself used to be compiled with |
Manually loading the polyfills first works. I just wasn't sure what the intent was/is? |
I don't have a problem with
Is there any demand for that? It's only really the REPL usecase and the non-Node usecases where we recommend standalone, so it seems fine to aim for ES5 for it. |
Posted a PR for this FYI: #8024 |
Fixed by #8024 |
I'm trying to get @babel/standalone@7 running in IE11 and getting the error:
Polyfilling
Can you tell me what I need to do to get the new version of babel-standalone running in an ES5 environment? I had no trouble with babel-standalone@6. |
I'm trying to run 7.8.3 version in Java Nashorn (jdk1.8) and it fails with the same error. Version 6.26.0 works (https://registry.npmjs.org/babel-standalone/-/babel-standalone-6.26.0.tgz). |
I'm trying to run @babel/standalone in an ES5 environment. I'm not sure this is target platform or not?
Anyway, one way to try this out is to use a really old version of node (0.10 for example)
Input Code
Expected Behavior
I was hoping this would work. It works on the 6.x branch
Current Behavior
Possible Solution
Are we not including the ES6 polyfills?
Context
Trying to run @babel/standalone in an ES5 engine (nashorn)
The text was updated successfully, but these errors were encountered: