-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
30 lines (27 loc) · 825 Bytes
/
next.config.mjs
File metadata and controls
30 lines (27 loc) · 825 Bytes
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
import remarkFrontmatter from 'remark-frontmatter';
// Notice that we use the ES2015 import and export statement because we can only import remark-frontmatter, instead of using the require statement. So with that, you can rename next.config.js to next.config.mjs.
const conf = {
webpack: (config, options) => {
config.module.rules.push({
test: /\.mdx?$/,
use: [
options.defaultLoaders.babel,
{
loader: '@mdx-js/loader',
options: {
providerImportSource: '@mdx-js/react',
remarkPlugins: [remarkFrontmatter],
rehypePlugins: [],
},
},
],
});
return config;
},
reactStrictMode: true,
eslint: {
ignoreDuringBuilds: true,
},
pageExtensions: ['ts', 'tsx', 'md', 'mdx'],
};
export default conf;