Package Exports
- @flashfix/express-trailingslash
- @flashfix/express-trailingslash/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@flashfix/express-trailingslash) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@flashfix/express-trailingslash
ExpressJS middleware that redirects requests with trailing slashes to a clean one without it
Usage:
app.use(require('@flashfix/express-trailingslash')());
When used together with serve-static, pass redirect: false
option to it to avoid conflicts:
app.use(require('serve-static')(`${__dirname}/public`, { redirect: false }));