Created
April 27, 2017 18:47
-
-
Save igmoweb/7c37ade5f2a949d9fb42dc7ac24a6991 to your computer and use it in GitHub Desktop.
Webpack + Babel + React
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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