Try to incoporate rewrites into router.

This commit is contained in:
sdiehl 2022-03-12 10:21:57 +00:00
parent 4a7eecef49
commit fcc48817f0
1 changed files with 18 additions and 2 deletions

View File

@ -14,11 +14,27 @@ const withMDX = withMDXImp({
providerImportSource: "@mdx-js/react",
},
})
export default withMDX({
const config = {
// Append the default value with md extensions
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
webpack: (config, { buildId, dev }) => {
config.resolve.symlinks = false
return config
}
})
}
const rewrites = async () => {
return [
{
source: '/concepts/:page(.md)',
destination: '/concepts/:page',
},
]
}
module.exports = {
withMDX(rewrites(config))
}