voodoods/webpack-boilerplate

Replace additional polyfills with Babel plugins

Closed this issue · 1 comments

Description:
To provide cross-browser compatibility, this project currently uses additional polyfills from libraries such as core-js or whatwg-fetch to transpile ES6 features like:

  • fetch
  • Set objects
  • Promise objects
  • Array.map method
  • Object.assign method

See: https://github.com/voodoods/webpack-boilerplate/blob/master/src/polyfills.js

In the course of switching to Babel 7 it would be awesome to check if some or all of these polyfills can be handled by Babel or Babel 7 compatible plugins. If a certain amount of browser support is provided, some of these polyfills may be even entirely removed.

The aim for this project should be a compatibility with the minimum versions of:

  • Mozilla Firefox (61)
  • Google Chrome (63)
  • Apple Safari (macOS) (11.0)
  • Apple Safari (iOS) (11.0)
  • Microsoft Internet Explorer (10)
  • Microsoft Edge (15)

Though I'm open for other opinions and suggestions on that one. Thanks in advance 👍

As stated in the README.md of core-js menu entry Babel:

core-js integrated to some parts of babel

And looking at babel's code, a babel-upgrade and removing duplicate or deprecated
plugins might do the trick - but I'd still be happy to try : ).
Edit: It seems like PR #8 already has done this.