1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-11 05:40:11 +02:00
copilot/ui/webpack/development.js

32 lines
692 B
JavaScript
Raw Normal View History

2016-10-24 16:13:02 +03:00
const base = require('./base.js');
2016-10-23 07:27:18 +03:00
const entries = require('./entrypoints');
const webpack = require('webpack');
const devServer = {
hot: true,
compress: true,
lazy: false,
publicPath: '/static/',
historyApiFallback: {
index: './static/index.html'
}
};
2016-10-24 16:13:02 +03:00
module.exports = Object.assign(base.config, {
2016-10-23 07:27:18 +03:00
entry: entries.reduce((all, entry) => {
all[entry.name] = [
'react-hot-loader/patch',
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
entry.path
];
return all;
}, {}),
2016-10-24 16:13:02 +03:00
plugins: base.config.plugins.concat([
2016-10-23 07:27:18 +03:00
new webpack.HotModuleReplacementPlugin()
]),
devtool: 'source-map',
devServer
});