mirror of
https://github.com/zhigang1992/react.git
synced 2026-01-30 17:18:35 +08:00
31 lines
569 B
JavaScript
31 lines
569 B
JavaScript
const withMDX = require('@next/mdx')({
|
|
extension: /\.(md|mdx)?$/,
|
|
options: {
|
|
rehypePlugins: [require('@mapbox/rehype-prism')],
|
|
},
|
|
})
|
|
|
|
const nextConfig = {
|
|
target: 'serverless',
|
|
|
|
pageExtensions: ['jsx', 'js', 'mdx', 'md', 'ts', 'tsx'],
|
|
|
|
cssModules: true,
|
|
|
|
cssLoaderOptions: {
|
|
importLoaders: 1,
|
|
localIdentName: '[local]___[hash:base64:5]',
|
|
},
|
|
|
|
env: {
|
|
VERSION: require('./package.json').version,
|
|
},
|
|
|
|
webpack(config) {
|
|
config.resolve.modules.push(__dirname)
|
|
return config
|
|
},
|
|
}
|
|
|
|
module.exports = withMDX(nextConfig)
|