These are chat archives for webpack/webpack/dev

11th
Feb 2018
Turner Hayes
@turnerhayes
Feb 11 00:42

OK, this seems to work: changing

const middleware = webpackDevMiddleware(compiler, {
        noInfo: true,
        publicPath: webpackConfig.output.publicPath,
        silent: true,
        stats: "errors-only",
    });
app.use(middleware);

to

const middleware = webpackDevMiddleware(compiler, {
        noInfo: true,
        publicPath: webpackConfig.output.publicPath,
        silent: true,
        stats: "errors-only",
    });
app.use(webpackConfig.output.publicPath, middleware);
That is, mounting the middleware only on the dev middleware's publicPath, so it doesn't try to handle requests for /. There may be some unforseen breakage, but at first blush it seems to work. Can anyone see a potential issue with it?