Use options for webpack dev middleware.

This commit is contained in:
Dillon Kearns 2019-08-20 21:53:58 -07:00
parent 8b6d364b49
commit a3b3b30e9a

View File

@ -26,15 +26,17 @@ function start({ routes, debug, manifestConfig, fileContents }) {
const options = {
contentBase: false,
// hot: true,
inline: false,
hot: true,
inline: true,
host: "localhost",
stats: "errors-only"
stats: "errors-only",
publicPath: "/"
};
const compiler = webpack(config);
const app = express();
app.use(middleware(compiler, { publicPath: "/" }));
app.use(middleware(compiler, options));
app.use("*", function(req, res, next) {
// don't know why this works, but it does