redux-devtools/examples/counter/webpack.config.js

42 lines
958 B
JavaScript

var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'react-hot-loader/patch',
'./src/index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
resolve: {
alias: {
'redux-devtools': path.join(__dirname, '..', '..', 'src'),
'react': path.join(__dirname, 'node_modules', 'react')
}
},
resolveLoader: {
'modules': [path.join(__dirname, 'node_modules')]
},
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel-loader'],
exclude: /node_modules/,
include: path.join(__dirname, 'src')
}, {
test: /\.js$/,
loaders: ['babel-loader'],
include: path.join(__dirname, '..', '..', 'src')
}]
}
};