Skip to content

Instantly share code, notes, and snippets.

@fguisso
Created June 28, 2017 19:44
Show Gist options
  • Save fguisso/662050c5a6d6cdcf27b935102d385ab2 to your computer and use it in GitHub Desktop.
Save fguisso/662050c5a6d6cdcf27b935102d385ab2 to your computer and use it in GitHub Desktop.

How to pollyfill webpack + karma:

npm i -save babel-polyfill Modify "karma.conf.js" (line 17):

files: ['./index.js'],
files: ['../../node_modules/babel-polyfill/dist/polyfill.js','./index.js'],

Modify "webpack.base.config.js" (line 12):

entry: {
app: './src/main.js'
},
entry: {
app: ['babel-polyfill', './src/main.js']
},

Why karma doesn't take the webpack configuration (is somebody can exmplain it, I will be very happy to understand)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment