-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext.config.js
More file actions
53 lines (50 loc) · 1.68 KB
/
next.config.js
File metadata and controls
53 lines (50 loc) · 1.68 KB
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
import mdx from '@next/mdx'
import remark from './src/mdx/remark.js'
import rehype from './src/mdx/rehype.js'
const nextConfig = {
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
// Static Exports
// See https://nextjs.org/docs/pages/building-your-application/deploying/static-exports
output: 'export',
// distDir: 'dist',
// Disable the 'x-powered-by' header
// https://nextjs.org/docs/api-reference/next.config.js/disabling-x-powered-by
poweredByHeader: false,
// https://nextjs.org/docs/api-reference/next.config.js/react-strict-mode
// React's Strict Mode is a development mode only feature for highlighting
// potential problems in an application. It helps to identify unsafe
// lifecycles, legacy API usage, and a number of other features.
// Found in tailwindui template syntax project
reactStrictMode: true,
// Handle SVG files
// Issue after upgrading from 13.2.4
// Removed issuer, see https://github.com/vercel/next.js/issues/48177
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
// issuer: /\.[jt]sx?$/,
use: [
{
loader: '@svgr/webpack',
options: {
dimensions: false,
replaceAttrValues: {},
},
},
],
})
return config
},
}
const withMDX = mdx({
options: {
remarkPlugins: remark,
rehypePlugins: rehype,
// Custom Elements
// https://nextjs.org/docs/advanced-features/using-mdx#custom-elements
// If you use `MDXProvider`, uncomment the following line.
// Use this to create your own custom components that map to HTML elements
// providerImportSource: "@mdx-js/react",
},
})
export default withMDX(nextConfig)