-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.mjs
46 lines (42 loc) · 1.14 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
// Auto-generate navigation
// TODO Move to server component
import './scripts/generateNavigation.mjs';
import nextMDX from '@next/mdx';
import withSearch from './src/mdx/search.mjs';
import { config } from './src/mdx/mdx.mjs';
import path from 'node:path';
import url from 'node:url';
const withMDX = nextMDX(config);
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
reactStrictMode: true,
transpilePackages: ['@rivet-gg/components'],
typescript: {
ignoreBuildErrors: true
},
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx', 'md'],
images: {
// For static output
unoptimized: true
},
experimental: {
scrollRestoration: true
},
webpack: config => {
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
return {
...config,
resolve: {
...config.resolve,
fallback: {
'react/jsx-dev-runtime': path.resolve(__dirname, 'node_modules/react/jsx-dev-runtime.js'),
react: path.resolve(__dirname, 'node_modules/react')
}
}
};
}
};
export default async function () {
return withSearch(withMDX(nextConfig));
}