-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
next.config.mjs
58 lines (55 loc) · 1.65 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import createMDX from "@next/mdx";
import mdxMermaid from "mdx-mermaid";
import rehypeKatex from "rehype-katex";
import rehypePrism from "rehype-prism-plus";
import remarkGfm from "remark-gfm";
import remarkHint from "remark-hint";
import remarkMath from "remark-math";
import withBundleAnalyzer from "@next/bundle-analyzer";
const withMDX = createMDX({
extension: /\.mdx?$/,
options: {
remarkPlugins: [
remarkMath,
remarkGfm,
remarkHint,
[mdxMermaid, { output: "svg" }],
],
rehypePlugins: [rehypeKatex, [rehypePrism, { plugins: ["line-numbers"] }]],
format: "mdx",
},
});
const configuredBundleAnalyzer = withBundleAnalyzer({
enabled: process.env.ANALYZE === "true",
});
export default configuredBundleAnalyzer(
withMDX({
experimental: {
turbo: {
resolveExtensions: [".mdx", ".tsx", ".ts", ".jsx", ".js"],
},
},
transpilePackages: ["next-mdx-remote"],
output: "standalone",
eslint: {
dirs: ["."],
},
pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"],
poweredByHeader: false,
trailingSlash: true,
basePath: "",
// The starter code load resources from `public` folder with `router.basePath` in React components.
// So, the source code is "basePath-ready".
// You can remove `basePath` if you don't need it.
reactStrictMode: true,
async rewrites() {
return [
{
// I want to have the htwr-aachen.de/panikzettel/{subject} route visible and we proxy the request to the api server
source: "/panikzettel/:path",
destination: "https://api.htwr-aachen.de/panikzettel/:path",
},
];
},
})
);