-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
57 lines (52 loc) · 1.21 KB
/
next.config.ts
File metadata and controls
57 lines (52 loc) · 1.21 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
54
55
56
57
import bundleAnalyzer from '@next/bundle-analyzer'
import { createMDX } from 'fumadocs-mdx/next'
import { createAutoImport } from 'next-auto-import'
import type { NextConfig } from 'next'
const withBundleAnalyzer = bundleAnalyzer({
// eslint-disable-next-line n/prefer-global/process
enabled: process.env.ANALYZE === 'true',
})
const withAutoImport = createAutoImport({
imports: [
'react',
{
twl: ['cn'],
},
{
from: 'motion/react-m',
imports: [['*', 'm']],
},
{
from: '~/components/icons/index.ts',
imports: ['Icon'],
},
{
from: '~/components/icons/index.ts',
imports: ['IconType', 'IconBaseProps'],
type: true,
},
{
from: '~/components/link.tsx',
imports: ['Link'],
},
],
dts: true,
})
const withMDX = createMDX()
const nextConfig: NextConfig = {
output: 'export',
reactStrictMode: true,
poweredByHeader: false,
images: {
unoptimized: true,
},
reactCompiler: true,
experimental: {
swcPlugins: [['@lingui/swc-plugin', {}]],
},
serverExternalPackages: ['typescript', 'twoslash'],
}
export default [withBundleAnalyzer, withMDX, withAutoImport].reduce(
(config, fn) => fn(config),
nextConfig,
)