-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
31 lines (27 loc) · 890 Bytes
/
Copy pathnext.config.js
File metadata and controls
31 lines (27 loc) · 890 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
31
const { createMDX } = require('fumadocs-mdx/next');
const withMDX = createMDX();
const isGithubPages = process.env.GITHUB_PAGES === 'true';
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
...(isGithubPages && {
output: 'export',
basePath: '/docs',
trailingSlash: true,
}),
experimental: {
optimizePackageImports: ['lucide-react', 'geist'],
},
images: {
unoptimized: isGithubPages,
remotePatterns: [
{ protocol: 'https', hostname: 'github.com' },
{ protocol: 'https', hostname: 'discord.com' },
{ protocol: 'https', hostname: 'user-images.githubusercontent.com' },
{ protocol: 'https', hostname: 'discordapp.com' },
{ protocol: 'https', hostname: 'avatars.githubusercontent.com' },
{ protocol: 'https', hostname: 'go.dev' },
],
},
};
module.exports = withMDX(nextConfig);