serve
serve copied to clipboard
`cleanUrls` not compatible with `-s` (single mode)
When running in -s (single mode, for SPAs), requests for files with .html extensions are redirected with the cleanUrls option (i.e., /foo.html is redirected to /foo). However, when the serve-handler code process the request for /foo, the 404 rewrite from /foo to /index.html takes precedence over the check for "related" files /foo -> /foo.html .
https://github.com/zeit/serve-handler/blob/2b8214081cfe2680f7d991ca837b0ee25e45739a/src/index.js#L244-L245
Perhaps the -s mode should disable cleanUrls option?
Yes, please!
Has anyone figured out a workaround for this? For now I have started adding any folders that contain static .html files to be excluded from cleanUrls but that's not wonderful.
+1 this behavior isnt exactly expected