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

48 lines
1.1 KiB
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-07-14 22:46:44 +03:00
'./index'
],
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:25:02 +03:00
'redux-devtools/lib': path.join(__dirname, '..', '..', 'src'),
'redux-devtools': path.join(__dirname, '..', '..', 'src'),
'react': path.join(__dirname, 'node_modules', 'react')
2015-07-14 22:46:44 +03:00
},
extensions: ['', '.js']
},
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/,
include: __dirname
}, {
test: /\.js$/,
loaders: ['babel'],
2015-07-14 22:46:44 +03:00
include: path.join(__dirname, '..', '..', 'src')
}, {
test: /\.css?$/,
loaders: ['style', 'raw'],
include: __dirname
}]
}
};