2016-12-28 22:44:45 +01:00
|
|
|
let config = {
|
2016-11-23 22:58:48 +01:00
|
|
|
cache: true,
|
2016-12-04 04:14:15 +01:00
|
|
|
entry: './src/client/index.js',
|
2016-11-23 22:58:48 +01:00
|
|
|
output: {
|
|
|
|
filename: './dist/browser-bundle.js'
|
|
|
|
},
|
|
|
|
target: 'web',
|
2016-11-30 20:57:35 +01:00
|
|
|
|
2016-11-23 22:58:48 +01:00
|
|
|
module: {
|
|
|
|
loaders: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
loader: 'babel-loader',
|
|
|
|
query: {
|
2016-12-02 17:20:59 +01:00
|
|
|
presets: ['es2015-native-modules', 'react'],
|
2017-01-18 02:41:53 +01:00
|
|
|
compact: 'true'
|
2016-11-23 22:58:48 +01:00
|
|
|
}
|
|
|
|
},
|
2017-01-18 02:41:53 +01:00
|
|
|
{ test: /\.json$/, loader: 'json-loader' }
|
2016-11-23 22:58:48 +01:00
|
|
|
]
|
|
|
|
},
|
2016-12-14 19:02:27 +01:00
|
|
|
node: {
|
|
|
|
fs: 'empty',
|
|
|
|
net: 'empty',
|
|
|
|
tls: 'empty'
|
|
|
|
}
|
2016-12-28 22:44:45 +01:00
|
|
|
}
|
2017-01-18 02:41:53 +01:00
|
|
|
|
|
|
|
if (process.env.NODE_ENV === 'production') {
|
|
|
|
config.devtool = 'cheap-module-source-map'
|
|
|
|
} else {
|
|
|
|
config.devtool = 'eval'
|
2016-12-28 22:44:45 +01:00
|
|
|
}
|
|
|
|
|
2017-01-18 02:41:53 +01:00
|
|
|
module.exports = config
|