I just started to use Babel to compile my ES6 javascript code into ES5. When I start to use Promises it looks like it's not working. The Babel website states support for promises via polyfills.  Without any luck, I tried to add:  require("bab...
After reading the article Removing Babel's Stage Presets by babel, I still not fully understand how to add a proposal from, for example, stage-3 (flatMap) to .babelrc.  As far as I understand, because flatMap can be written in ES5, then I need a...
I am using ChildNode.remove() and I described by Mozilla I need a polyfill for IE. I am using webpack with the babel-polyfill configured:   "babel-polyfill": "^6.13.0",  "webpack": "^2.4.1",   webpack.config.babel.js:...
I'm relatively new to ES6+ (called modern JavaScript) but it seems if I want to use it in browsers I need babel-minify or terser. (First I thought Babili is another player but it's just the old name of Babel-Minify)  About polyfills for the b...
I'm facing this error when I execute webpack:  Module not found: Error: Can't resolve 'core-js/modules/es6.array.map' in '/path/to/project/src'  @ ./src/index.ts 1:0-39   index.ts:  console.log([1, 2, 3].map(x => x * x));...
I'm trying to query the server to get list of nav items so I can build my menu on init. I've so far managed to create a static page with 3 contents on the home page, which includes header, sidebar and content. The sidebar is the menu which is...
I am unable to find a defined set of features that Babel compiler cannot compile. I know that there is babel-polyfill and core.js but I need to know the exact names of es2015 features which babel compiler cannot compile.  Any help would be appreciate...
I'm using babel-polyfill and I'm trying to iterate an HTMLCollection object using for-of loop:  const elements = document.getElementsByClassName('some-class') for (const element of elements) {   console.log(element) }   It's not w...
I'm trying to contribute to a testing library. The library should provide a wrapper for react-test-renderer like react-native-testing-library does.  In order to see if my code worked I wrote a simple unit test using the code I wrote for the libra...
I am getting the following error  Uncaught Error: only one instance of babel-polyfill is allowed     at Object.eval (index.js?db4d:10)     at eval (index.js:29)     at Object../node_modules/babel-polyfill/lib/index.js (vendors.js?3b19ee46035be2acbd36...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.