Home:ALL Converter>Babel polyfill with webpack

Babel polyfill with webpack

Ask Time:2016-06-30T16:50:12         Author:exoslav

Json Formatter

Do I need to include import "babel-polyfill" to the top of each entry file, or is it enough to have babel-polyfill rule just in webpack.config file? I am confused by polyfill docs and still getting following error: only one instance of babel-polyfill is allowed

My webpack.config in short:

  entry1: ['babel-polyfill', 'homepage.js'],
  entry2: ['babel-polyfill', 'not-homepage.js'],
  entry3: ['babel-polyfill', 'contacts.js']

Author:exoslav,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/38118210/babel-polyfill-with-webpack
yy