2017-03-03 01:44:07 +00:00
|
|
|
const webpack = require('webpack');
|
|
|
|
const baseConfig = require('./webpack.config.base.babel');
|
2016-04-20 02:14:53 +00:00
|
|
|
|
2016-10-21 17:20:36 +00:00
|
|
|
const PORT = 3333;
|
|
|
|
|
2017-03-03 01:44:07 +00:00
|
|
|
module.exports = {
|
2016-04-20 02:14:53 +00:00
|
|
|
...baseConfig,
|
2017-02-26 21:12:51 +00:00
|
|
|
devtool: 'eval-source-map',
|
2016-04-20 02:14:53 +00:00
|
|
|
entry: [
|
2017-03-03 01:44:07 +00:00
|
|
|
'react-hot-loader/patch',
|
2017-03-03 20:09:08 +00:00
|
|
|
...baseConfig.entry
|
2016-04-20 02:14:53 +00:00
|
|
|
],
|
|
|
|
output: {
|
|
|
|
...baseConfig.output,
|
2017-03-03 20:09:08 +00:00
|
|
|
publicPath: `http://localhost:${PORT}/`
|
2017-03-03 01:44:07 +00:00
|
|
|
},
|
|
|
|
devServer: {
|
|
|
|
hot: true,
|
|
|
|
hotOnly: true,
|
|
|
|
noInfo: true,
|
|
|
|
port: PORT,
|
2017-03-03 20:09:08 +00:00
|
|
|
publicPath: `http://localhost:${PORT}/`
|
2016-04-20 02:14:53 +00:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
...baseConfig.plugins,
|
2017-03-03 01:44:07 +00:00
|
|
|
new webpack.LoaderOptionsPlugin({debug: true}), // Legacy global loader option
|
2016-04-20 02:14:53 +00:00
|
|
|
new webpack.HotModuleReplacementPlugin(),
|
2017-02-26 21:12:51 +00:00
|
|
|
new webpack.NoEmitOnErrorsPlugin(),
|
2017-03-03 01:44:07 +00:00
|
|
|
new webpack.NamedModulesPlugin(),
|
2016-04-20 02:14:53 +00:00
|
|
|
new webpack.DefinePlugin({
|
|
|
|
__DEV__: true,
|
2016-08-17 22:44:03 +00:00
|
|
|
'process.env.NODE_ENV': JSON.stringify('development'),
|
|
|
|
'process.env.INSOMNIA_ENV': JSON.stringify('development')
|
2016-04-20 02:14:53 +00:00
|
|
|
})
|
|
|
|
]
|
2017-03-03 01:44:07 +00:00
|
|
|
};
|