fix(cli): respect router.trailingSlash when serving static files (#8398)

This commit is contained in:
Daniel Roe 2020-11-30 14:57:37 +00:00 committed by GitHub
parent e02fecdf5b
commit 09748d489e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,8 @@ export async function serve (cmd) {
app.use( app.use(
options.router.base, options.router.base,
serveStatic(options.generate.dir, { serveStatic(options.generate.dir, {
extensions: ['html'] extensions: ['html'],
redirect: !!options.router.trailingSlash
}) })
) )
if (options.generate.fallback) { if (options.generate.fallback) {