Skip to content

Instantly share code, notes, and snippets.

@cmosguy
Last active Aug 7, 2016
Embed
What would you like to do?
var path = require( 'path' );
var webpack = require( 'webpack' );
var env = process.env.NODE_ENV || 'production';
var dev = [ 'development', 'testing' ].indexOf( env.toLowerCase() ) !== -1 ? true : false;
module.exports = {
devtool: dev ? 'inline-source-map' : 'eval',
entry: [
'react-hot-loader/patch',
'webpack-dev-server/client?http://192.168.10.10:8888',
'webpack/hot/only-dev-server',
'./src/index',
],
output: {
path: path.join( __dirname, 'dist' ),
filename: 'bundle.js',
publicPath: '/static/',
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
module: {
loaders: [
{
test: /\.js$/,
loaders: [ 'babel' ],
include: path.join( __dirname, 'src' ),
},
],
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment