joyent-portal/frontend/webpack/development.js

31 lines
702 B
JavaScript
Raw Normal View History

2016-10-20 04:14:26 +03:00
const graphql = require('../../cloudapi-graphql/src/endpoint');
2016-10-24 16:11:50 +03:00
const base = require('./base.js');
2016-10-20 04:14:26 +03:00
const webpack = require('webpack');
const devServer = {
hot: true,
compress: true,
lazy: false,
2016-10-24 16:11:50 +03:00
publicPath: base.config.output.publicPath,
2016-10-20 04:14:26 +03:00
setup: (app) => {
app.use('/graphql', graphql);
},
historyApiFallback: {
index: './static/index.html'
}
};
2016-10-24 16:11:50 +03:00
module.exports = Object.assign(base.config, {
2016-10-20 04:14:26 +03:00
entry: [
'react-hot-loader/patch',
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
'./index.js'
],
2016-10-24 16:11:50 +03:00
plugins: base.config.plugins.concat([
2016-10-20 04:14:26 +03:00
new webpack.HotModuleReplacementPlugin()
]),
devtool: 'source-map',
devServer
});