Created
April 15, 2016 17:51
-
-
Save madeinfree/ecdaae29e06a7b5dad450e426bc21695 to your computer and use it in GitHub Desktop.
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
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
entry: { | |
app: [ './app/main.react.js' ], | |
vendors: [ 'webpack-dev-server/client?http://localhost:8080', 'webpack/hot/only-dev-server' ] | |
}, | |
output: { | |
path: path.resolve(__dirname, 'build'), | |
filename: 'bundle.js' | |
}, | |
debug: true, | |
devtool: 'eval-source-map', | |
resolve: { | |
extensions: ['', '.js', '.jsx'] | |
}, | |
module: { | |
preLoaders: [ | |
{ | |
test: /\.js$/, | |
exclude: [ /node_modules/ ], | |
loader: 'eslint' | |
} | |
], | |
loaders: [{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
loaders: ['react-hot', 'babel'] | |
}] | |
}, | |
plugins: [ | |
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), | |
new webpack.HotModuleReplacementPlugin(), | |
new webpack.NoErrorsPlugin() | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment