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

42 lines
943 B
JavaScript
Raw Normal View History

2015-07-14 22:46:44 +03:00
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',
2015-09-24 22:06:06 +03:00
'./src/index'
2015-07-14 22:46:44 +03:00
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
2015-08-29 01:01:23 +03:00
new webpack.HotModuleReplacementPlugin()
2015-07-14 22:46:44 +03:00
],
resolve: {
alias: {
2015-07-15 00:11:55 +03:00
'redux-devtools': path.join(__dirname, '..', '..', 'src'),
'react': path.join(__dirname, 'node_modules', 'react')
2015-09-24 22:06:06 +03:00
}
2015-07-14 22:46:44 +03:00
},
2015-08-13 01:05:32 +03:00
resolveLoader: {
'fallback': path.join(__dirname, 'node_modules')
},
2015-07-14 22:46:44 +03:00
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel'],
2015-07-14 22:46:44 +03:00
exclude: /node_modules/,
2015-09-24 22:06:06 +03:00
include: path.join(__dirname, 'src')
2015-07-14 22:46:44 +03:00
}, {
test: /\.js$/,
loaders: ['babel'],
2015-07-14 22:46:44 +03:00
include: path.join(__dirname, '..', '..', 'src')
}]
}
};