1. Install it with npm This command is run in the directly that contains the package.json file: npm i babel-polyfill --save-dev
  2. Edit your webpack.config.js file to make use of it The snippet below shows how the babel-polyfill is added to the entry array.

module.exports = { ..., entry: [ 'webpack-hot-middleware/client', 'babel-polyfill', './app/client.js' ],

  1. Import it into your project Here's what importing babel-polyfill looks like in my project file which is located at app/client.js: import 'react-toolbox/lib/commons.scss'; import React from 'react'; import ReactDOM from 'react-dom'; import 'babel-polyfill'; import App from './App.js';