-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.mjs
executable file
·49 lines (38 loc) · 1.09 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
import remarkGfm from "remark-gfm";
import mdx from '@next/mdx';
import path from "path";
import {fileURLToPath} from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const withMDX = mdx({
extension: /\.mdx?$/,
options: {
// If you use remark-gfm, you'll need to use next.config.mjs
// as the package is ESM only
// https://github.com/remarkjs/remark-gfm#install
remarkPlugins: [remarkGfm],
rehypePlugins: [],
providerImportSource: '@mdx-js/react',
},
});
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
pageExtensions: ['ts', 'tsx', 'mdx'],
reactStrictMode: true,
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',
images: {
unoptimized: true,
},
webpack: (config) => {
config.resolve.fallback = {
fs: false,
child_process: false,
};
return config;
},
};
export default withMDX(nextConfig);