1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-03 00:20:04 +02:00
copilot/ui/webpack/development.js
2016-10-25 14:05:51 +01:00

32 lines
692 B
JavaScript

const base = require('./base.js');
const entries = require('./entrypoints');
const webpack = require('webpack');
const devServer = {
hot: true,
compress: true,
lazy: false,
publicPath: '/static/',
historyApiFallback: {
index: './static/index.html'
}
};
module.exports = Object.assign(base.config, {
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;
}, {}),
plugins: base.config.plugins.concat([
new webpack.HotModuleReplacementPlugin()
]),
devtool: 'source-map',
devServer
});