Skip to content

This is an example to learn how to setup webpack, babel and corejs(pollyfills)

Notifications You must be signed in to change notification settings

dung1764/webpack-babel-pollyfills

Repository files navigation

This is an example to learn how to setup webpack, babel and corejs(pollyfills)

webpack

webpack is an open-source JavaScript module bundler. It is made primarily for JavaScript, but it can transform front-end assets such as HTML, CSS, and images if the corresponding loaders are included.

babel (javascript syntax)

Babel is a free and open-source JavaScript transcompiler that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript that can be run by older JavaScript engines.

pollyfills (javascript api)

A polyfill is code that implements a feature on web browsers that do not support the feature. Most often, it refers to a JavaScript library that implements an HTML5 web standard, either an established standard (supported by some browsers) on older browsers, or a proposed standard (not supported by any browsers) on existing browsers.

babel/preset-env

In this example, we use @babel/preset-env and corejs instead of pollyfills

browserslist

You can add browserslist to .browserslistrc config :

defaults
not IE 11
not IE_Mob 11
maintained node versions

Or package.json :

  "browserslist": [
    "defaults",
    "not IE 11",
    "not IE_Mob 11",
    "maintained node versions"
  ]

About

This is an example to learn how to setup webpack, babel and corejs(pollyfills)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published