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
1 answer

Babel transforming new Request (fetch-api) to function call, causing errors in Chrome

I wrote a separate API library that I'm keeping as pure ES6 (with generators, etc) but it relies on the isomorphic-fetch library (so it can be used in both node and browser contexts). When importing it with webpack 2 in another project, everything…
0
votes
1 answer

Using babel-polyfill with webpack

I keep on encountering the following error when trying to use the babel-polyfill with webpack. How should i use it without the loader like babel-loader? It was mentioned that it will emulate the es2015 environment. ERROR in…
Krishna Satya
  • 775
  • 2
  • 9
  • 21
0
votes
1 answer

Why does my babel poyfill is not working?

Below is my webpack config: var Path = require('path'); module.exports = { entry: { create: ['babel-polyfill', Path.resolve(__dirname, "./src/create.js")], }, output: { path: Path.resolve(__dirname, "../../public/crm/js/"), …
Dreams
  • 8,288
  • 10
  • 45
  • 71
0
votes
2 answers

ES6 imports and require not working properly with gulp/browserify/babelify

I have a simple Gulp configuration to transpile my javascript with babel : gulp.task('js_dev', function () { var bundler = browserify({entries: ['js/index.js'], debug: true}); bundler.external('jquery'); return bundler …
MrJambon
  • 11
  • 3
0
votes
2 answers

Babel polyfill: Run ES6 code from ajax

I'm trying to set up a page which loads HTML pages with ajax, and sets the contents of an element on the host page to the HTML pulled from the server. The HTML may contain script tags. This works fine for regular script elements (ES5, or…
user377628
-1
votes
1 answer

I need to polyfill nullish-coalescing-operator and optional-chaining

I have an angular application which I recently upgraded to angular 15. I have a requirement to support it in Chrome 69 browser. When I run in Chrome 69, I get 2 errors which are related to the optional-chaining and nullish-coalescing-operator. Could…
Nitin Avula
  • 333
  • 2
  • 7
  • 21
-1
votes
1 answer

when i add a package i recieve webpack < 5 used to include polyfills for node.js core modules by default.This is no longer the case

i use react with laravel. i install a date picker package with nmp and after install that when i start npm run watch i recieved this error Module not found: Error: Can't resolve 'stream' in…
poldark
  • 33
  • 1
  • 7
-1
votes
1 answer

JavaScript ES6 in Internet Explorer 11

I am trying to run a Javascript code in Internet Explorer 11. It not working with arrow functions or ``, however I need these sintax because I would like to work more comfortable and do not have some issues with this. I trying with Babel at top and…
Miguel Herreros Cejas
  • 664
  • 1
  • 12
  • 28
-1
votes
1 answer

Fetch as Google returns blank page with error unexpected token =>

I'm currently working on a SPA React app, but when I try to fetch as google I get a blank page with the error Uncaught SyntaxError: Unexpected token =>. I did install babel-polyfill and also imported it as first import. I've been reading and trying…
-1
votes
1 answer

How to import babel-polyfill only one time

I done a react library that I share between a react web app and a react native app. It uses return regeneratorRuntime.wrap to replace async. So I have to import babel-polyfill to do it working. I add : import "babel-polyfill"; on my module…
fstn
  • 149
  • 4
  • 10
1 2 3
17
18