Why doesn't babel-standalone @ 6 work in Firefox 20?

I wrote the code and, opening a page in a browser (Firefox 20.0), I found the following error in the console:

JS: https://unpkg.com/ babel-standalone @ 6 /babel.min.js

TypeError: e.forEach is not a function @ https://unpkg.com/ babel-standalone @ 6 /babel.min.js:8

CODE:

<script type="text/babel">
   let input = [1, 2, 3];
   console.log(typeof input);
</script>

I noticed that using " let " or " var " does not matter. It falls even until it reaches these lines. Why is this so? Did I miss something?

PS: Although I can use NPM and use a browser to use babel, but I just want to test it using this script.

+4
source share
1 answer

It looks like the version of Firefox you are using is not supported by Lodash, which Babel depends on https://github.com/lodash/lodash/issues/2924

Usually babel-standalone targets standard ES5 environments, but this is apparently a case that we cannot solve, since it is in one of our dependencies.

+2
source

Source: https://habr.com/ru/post/1693015/


All Articles