Skip to content

Instantly share code, notes, and snippets.

@imjakechapman
Last active January 16, 2016 04:15
Show Gist options
  • Select an option

  • Save imjakechapman/6c03e59e90219981d851 to your computer and use it in GitHub Desktop.

Select an option

Save imjakechapman/6c03e59e90219981d851 to your computer and use it in GitHub Desktop.
ES2015 Webpack Configs

Before you do this, make sure you've updated your node version :)

  1. rename webpack.config.js to webpack.config.babel.js
  2. npm -i --save-dev babel babel-loader babel-preset-es2015 babel-preset-stage-0
  3. create a .babelrc file in root directory
  4. add the following to .babelrc
{
  "presets": ["es2015", "stage-0"]
}
  1. In your package.json scripts have the following
"scripts": {
  "start": "webpack"
}

tada!

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