Skip to content

Instantly share code, notes, and snippets.

@igmoweb
Created April 27, 2017 18:47
Show Gist options
  • Save igmoweb/7c37ade5f2a949d9fb42dc7ac24a6991 to your computer and use it in GitHub Desktop.
Save igmoweb/7c37ade5f2a949d9fb42dc7ac24a6991 to your computer and use it in GitHub Desktop.
Webpack + Babel + React
const path = require( 'path' );
module.exports = {
entry: [
'./src/index.js'
],
output: {
filename: 'app.js',
path: path.resolve( __dirname, 'build' )
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
options: {
presets: ['es2015', 'react']
},
include: [
path.resolve( __dirname, 'src/' )
]
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment