mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-29 12:45:32 +08:00
feat: initial
This commit is contained in:
33
next.config.js
Normal file
33
next.config.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const withCSS = require('@zeit/next-css')
|
||||
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(
|
||||
withCSS(nextConfig)
|
||||
)
|
||||
Reference in New Issue
Block a user