-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.mjs
41 lines (36 loc) · 1.08 KB
/
next.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/** @type {import('next').NextConfig} */
import nextMDX from '@next/mdx';
import remarkGfm from 'remark-gfm';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
import withYaml from 'next-plugin-yaml';
const isProd = process.env.NODE_ENV === 'production'
const withMDX = nextMDX({
extension: /\.mdx?$/,
options: {
remarkPlugins: [remarkGfm, remarkMath],
rehypePlugins: [rehypeKatex],
// If you use `MDXProvider`, uncomment the following line.
providerImportSource: '@mdx-js/react',
},
});
export default withYaml(
withMDX({
// Append the default value with md extensions
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
reactStrictMode: true,
swcMinify: true,
assetPrefix: isProd ? `https://${process.env.VERCEL_URL}` : undefined,
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
return config;
},
publicRuntimeConfig: {
GAMeasurementId: 'G-SPCEM7FV1Z',
CanonicalUrlBase: 'https://authzed.com/zanzibar',
},
})
);