Files
react/next.config.js
2020-03-19 01:15:58 +08:00

34 lines
624 B
JavaScript

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)
)