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',
|
2016-04-18 15:28:16 +03:00
|
|
|
'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: {
|
2017-11-11 22:02:04 +03:00
|
|
|
'modules': [path.join(__dirname, 'node_modules')]
|
2015-08-13 01:05:32 +03:00
|
|
|
},
|
2015-07-14 22:46:44 +03:00
|
|
|
module: {
|
|
|
|
loaders: [{
|
|
|
|
test: /\.js$/,
|
2017-11-11 22:02:04 +03:00
|
|
|
loaders: ['babel-loader'],
|
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$/,
|
2017-11-11 22:02:04 +03:00
|
|
|
loaders: ['babel-loader'],
|
2015-07-14 22:46:44 +03:00
|
|
|
include: path.join(__dirname, '..', '..', 'src')
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
};
|