Skip to content

Commit

Permalink
Switching to webpack-serve. There were a number of hot reload issues …
Browse files Browse the repository at this point in the history
…with WDS

Webpack Dev Server had some bad issues with their websocket for hot reloading setup.
They made some assumptions about what the servers base URL, HOST, and PORT and this was *not* configurable by the user.
This made the hot reloading features fail hard when used through a proxy like insights-proxy
See: webpack/webpack-dev-server#1289

webpack-serve does not have these same issues
  • Loading branch information
iphands committed May 31, 2018
1 parent 0d4f0c6 commit 6dc8311
Show file tree
Hide file tree
Showing 4 changed files with 1,194 additions and 748 deletions.
11 changes: 11 additions & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ const pkg = require('../package.json');
const webpack_config = {
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
devtool: false,
serve: {
content: config.paths.public,
port: 8002,
dev: {
publicPath: '/insights'
},
// https://github.com/webpack-contrib/webpack-serve/blob/master/docs/addons/history-fallback.config.js
add: (app, middleware, options) => {
app.use(convert(history({})));
},
},
optimization: {
minimize: process.env.NODE_ENV === 'production',
splitChunks: {
Expand Down
34 changes: 0 additions & 34 deletions config/webpack.server.js

This file was deleted.

Loading

0 comments on commit 6dc8311

Please sign in to comment.