Last active
January 7, 2017 08:16
-
-
Save akshendra/01803089956f2f2cc01dbf19dc903d15 to your computer and use it in GitHub Desktop.
webpack config for react projects
This file contains 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
'use strict'; | |
const p = require('path'); | |
// const webpack = require('webpack'); | |
module.exports = { | |
// we are going to read from here | |
entry: p.resolve(__dirname, 'src/app.js'), | |
// where we gonna spit it out | |
output: { | |
path: p.resolve(__dirname, 'dist'), | |
filename: 'app.bundle.js', | |
}, | |
// modules | |
module: { | |
loader: [{ | |
test: /\.js$/, | |
loader: 'babel-loader', | |
query: { | |
presets: ['es2015', 'react'], | |
}, | |
}], | |
}, | |
// stats | |
stats: { | |
colors: true, | |
}, | |
devtool: 'source-map', | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment