This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create src/middleware/trailingSlashRedirect.js// | |
export default function ({ route, redirect }) { | |
if (route.path !== '/' && route.path.endsWith('/')) { | |
const { path, query, hash } = route; | |
const nextPath = path.replace(/\/+$/, '') || '/'; | |
const nextRoute = { path: nextPath, query, hash }; | |
redirect(nextRoute); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
lerna-debug.log* | |
# Diagnostic reports (https://nodejs.org/api/report.html) | |
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |