Mostly taken from: https://gitlab.com/sebdeckers/express-history-api-fallback, without all the repo/package fluff.
let staticPath = '/path/to/dist'
app.use(express.static(staticPath))
app.use('/', ((...args) => (req, res, next) => {
if ((req.method === 'GET' || req.method === 'HEAD') && req.accepts('html')) {
(res.sendFile || res.sendfile).call(res, ...args, err => err && next())
} else next()
})('index.html', {
root: staticPath
}))