Skip to content

Instantly share code, notes, and snippets.

@madeinfree
Created April 15, 2016 17:51
Show Gist options
  • Save madeinfree/ecdaae29e06a7b5dad450e426bc21695 to your computer and use it in GitHub Desktop.
Save madeinfree/ecdaae29e06a7b5dad450e426bc21695 to your computer and use it in GitHub Desktop.
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