dubdiff/webpack.config.js

36 lines
628 B
JavaScript
Raw Normal View History

2016-12-28 22:44:45 +01:00
let config = {
2016-11-23 22:58:48 +01:00
cache: true,
entry: './src/client/index.js',
2016-11-23 22:58:48 +01:00
output: {
filename: './dist/browser-bundle.js'
},
target: 'web',
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'],
compact: 'true'
2016-11-23 22:58:48 +01:00
}
},
{ test: /\.json$/, loader: 'json-loader' }
2016-11-23 22:58:48 +01:00
]
},
node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
}
2016-12-28 22:44:45 +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
}
module.exports = config