Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (48 sloc) 1.23 KB
const webpack = require('webpack');
const path = require('path');
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client',
path.join(__dirname, '../app/index.js'),
],
output: {
path: path.join(__dirname, '../public'),
filename: 'bundle.js',
publicPath: '/',
},
module: {
loaders: [
{ test: /\.css$/, loader: 'style!css' },
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'react'],
plugins: [['react-transform', {
transforms: [{
transform: 'react-transform-hmr',
imports: ['react'],
// this is important for Webpack HMR:
locals: ['module']
}, {
transform: 'react-transform-catch-errors',
imports: ['react', 'redbox-react'],
}]
}]],
},
},
],
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('development'),
},
}),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
],
};