mirror of
https://github.com/zhigang1992/react.git
synced 2026-01-24 20:57:51 +08:00
* docs: add home page * docs(homepage): apply suggestions from code review * docs(homepage): make cards clickable Co-authored-by: witt <unix.bio@gmail.com>
53 lines
912 B
JavaScript
53 lines
912 B
JavaScript
const withMDX = require('@next/mdx')({
|
|
extension: /\.(md|mdx)?$/,
|
|
options: {
|
|
rehypePlugins: [require('@mapbox/rehype-prism'), require('rehype-join-line')],
|
|
},
|
|
})
|
|
|
|
const nextConfig = {
|
|
target: 'serverless',
|
|
|
|
// reactStrictMode: true,
|
|
|
|
generateEtags: false,
|
|
|
|
poweredByHeader: false,
|
|
|
|
eslint: {
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
|
|
pageExtensions: ['jsx', 'js', 'mdx', 'md', 'ts', 'tsx'],
|
|
|
|
cssModules: true,
|
|
|
|
cssLoaderOptions: {
|
|
importLoaders: 1,
|
|
localIdentName: '[local]___[hash:base64:5]',
|
|
},
|
|
|
|
env: {
|
|
VERSION: require('./package.json').version,
|
|
},
|
|
|
|
trailingSlash: false,
|
|
|
|
async redirects() {
|
|
return [
|
|
{
|
|
source: '/',
|
|
permanent: true,
|
|
destination: '/en-us',
|
|
},
|
|
{
|
|
source: '/icons',
|
|
permanent: true,
|
|
destination: '/en-us/components/icons',
|
|
},
|
|
]
|
|
},
|
|
}
|
|
|
|
module.exports = withMDX(nextConfig)
|