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

47 lines
1.1 KiB
JavaScript
Raw Permalink 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',
'./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: ['react-hot', 'babel'],
exclude: /node_modules/,
include: __dirname
}, {
test: /\.js$/,
2015-08-13 01:05:32 +03:00
loaders: ['react-hot', 'babel'],
2015-07-14 22:46:44 +03:00
include: path.join(__dirname, '..', '..', 'src')
}, {
test: /\.css?$/,
loaders: ['style', 'raw'],
include: __dirname
}]
}
};