Questions tagged [babel-polyfill]

Babel Polyfill will emulate a full ES6 environment. This polyfill is automatically loaded when using babel-node.

Installation:

$ npm install babel-polyfill

To find more information :

265 questions
0
votes
0 answers

React JS not working in IE 11 but in chrome, giving syntax error

I have the webpack+babel setup for React JS project. It works well in Chrome browser but gives 'Syntax error' in IE. I believe this is due to babel polyfills, so I have followed numerous solutions(like -…
Learner
  • 800
  • 1
  • 12
  • 34
0
votes
0 answers

Babel not polyfilling with NPM / Webpack?

I'm really new to Webpack + Babel and wanted to give this a try on my project, however when I run my "npm run build" to run the webpack.production.config.js file I've included, it doesn't seem to be creating the necessary polyfills for IE11 in my…
Nathan
  • 58
  • 5
0
votes
0 answers

Callback on returned promise chain runs before callbacks in the aforementioned promise chain

Context: Codebase I'm working in is a mixture of ES5 and ES6 thanks to babel. I'm trying to accomplish waiting on a promise (returned by an async function in ES6 code) using .then() (in ES5 code). Here's the async function I'd like to wait…
0
votes
1 answer

how to make webpack import polyfills only for a specific build?

I just managed to make webpack create two separete builds one for es5 and another for es6. See below the config file: const path = require("path"); const common = require("./webpack.common"); const merge = require("webpack-merge"); const…
Ricardo Silva
  • 1,221
  • 9
  • 19
0
votes
1 answer

core-js cannot resolve core-js/modules/es6.typed.uint32-array

I recently struggled to find a solution to the below error about core-js/modules/es6.typed.uint32-array not being found during Webpack stage when including an C++ Emscripten-generated javascript module into a Gatsby React app in some dev-dependency…
thadk
  • 1,002
  • 1
  • 9
  • 18
0
votes
1 answer

document.getElementsByTagName('ul')[0]["__proto__"] instanceof HTMLUListElement is false

I have native and web components in my website. And I use document-register-element polyfill. When I check document.getElementsByTagName('ul')[0]["__proto__"] instanceof HTMLUListElement is returning false. When I checked what is HTMLUListElement is…
0
votes
1 answer

Why does my vue web app load a blank page in IE11 and look broken in Edge?

I'm having a bit of trouble with getting my project to work on IE11 and Edge You can view it here: https://tagfireandsecurity.co.uk/ THE PROBLEMS IE11: Blank page, shows multiple errors: SCRIPT1002: Syntax error firebase-app.js (1,1) SCRIPT1002:…
squish
  • 846
  • 12
  • 24
0
votes
1 answer

babel core 7.4.4, using all polyfills by default

I was tasked to make one of the mobile apps written in react compatible with opera mini in extreme mode. During the testing, I learned that nothing that is in react code works there, however by including this babel-polyfill before main.js file it…
Mevia
  • 1,517
  • 1
  • 16
  • 51
0
votes
2 answers

Target browser option in useBuiltIns/babel polyfill

I want to use 'useBuiltIns' option to load polyfills only for IE11 browser. [ '@babel/preset-env', { useBuiltIns: 'entry', debug: true, modules: false, corejs: '3', targets: { node: true, …
0
votes
1 answer

How to set useBuiltIns option

I am using Webpack and want to set Babel "useBuiltIns" option to enable pollyfills for "promises" in my JS files. I couldn't find a complete working example and all my tries are ending up with an error. This is my package.json try: { "name":…
Philipp S.
  • 827
  • 17
  • 41
0
votes
1 answer

Browserlist config do not include Map polyfill

As I understand Browserlist tool is automatically adds needed polyfills if older browser support required. I'm trying to run ES6 js code in old Android Chrome Webview v.30 but got error: Uncaught ReferenceError: Map is not defined", source:…
Eazy
  • 3,212
  • 5
  • 24
  • 40
0
votes
0 answers

What is wrong with my Babel configuration?

I have configured Babel for my project with ".babelrc" file. My .babelrc file is, { "presets": [ [ "@babel/preset-env", { "useBuiltIns": "entry" } ] ] } I have imported "core-js/stable" and "regenerator-runtime/runtime" using…
0
votes
0 answers

Rollup.js after-build error: Error: Cannot find module './polyfills.js'

I'm building my library using Rollup.js. After bundling, I want to run it via node command like: node -e "require('./dist/index.min.js')" But it throws me an error: internal/modules/cjs/loader.js:605 throw err; ^ Error: Cannot find module…
lukaszkups
  • 5,790
  • 9
  • 47
  • 85
0
votes
0 answers

Blank pages on IE on html project using vue js cdn

I created a project in html using the cdn for vue js. It works perfectly for chrome, but when I try to test it on IE11 it shows only blank pages. I know that when using the vue-cli with webpack there is a workaround this issue using polyfill. Is…
0
votes
0 answers

IE returning blank screen even when polyfill configuarations are provided

Hi I have build a webcomponent using vue. It is working perfectly in chrome . But it is returning a blank screen in IE 11. I have given babel configuaration . I think the issue is the arrow operator not getting transpilled. package.json { …