2016-05-03 04:09:16 +00:00
|
|
|
var webpack = require('webpack');
|
2016-07-20 23:48:00 +00:00
|
|
|
require('dotenv').config();
|
2016-05-03 04:09:16 +00:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
devtool: 'cheap-module-eval-source-map',
|
2016-07-22 20:45:16 +00:00
|
|
|
entry: ['babel-polyfill', 'webpack-hot-middleware/client',
|
2016-05-03 04:09:16 +00:00
|
|
|
'./client/index.js',
|
|
|
|
],
|
|
|
|
output: {
|
|
|
|
path: __dirname + '/dist/',
|
|
|
|
filename: 'bundle.js',
|
|
|
|
publicPath: '/dist/'
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['', '.js', '.jsx'],
|
|
|
|
},
|
|
|
|
plugins: [
|
2016-06-22 22:36:04 +00:00
|
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
'process.env': {
|
|
|
|
CLIENT: JSON.stringify(true),
|
|
|
|
'NODE_ENV': JSON.stringify('development'),
|
2016-07-20 23:48:00 +00:00
|
|
|
'S3_BUCKET': '"' + process.env.S3_BUCKET + '"'
|
2016-06-22 22:36:04 +00:00
|
|
|
}
|
|
|
|
})
|
2016-05-03 04:09:16 +00:00
|
|
|
],
|
|
|
|
module: {
|
|
|
|
loaders: [
|
|
|
|
{
|
2016-06-27 21:40:16 +00:00
|
|
|
test: /\.jsx?$/,
|
2016-05-03 04:09:16 +00:00
|
|
|
exclude: [/node_modules/, /.+\.config.js/],
|
2016-07-22 17:14:26 +00:00
|
|
|
loaders: ['babel', 'eslint-loader']
|
2016-05-03 04:09:16 +00:00
|
|
|
},
|
2016-05-03 20:13:04 +00:00
|
|
|
{
|
2016-05-10 18:18:36 +00:00
|
|
|
test: /\.scss$/,
|
|
|
|
loaders: ['style', 'css', 'sass']
|
2016-05-11 17:19:37 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.svg$/,
|
|
|
|
loader: 'file'
|
2016-05-03 20:13:04 +00:00
|
|
|
}
|
2016-05-03 04:09:16 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
};
|