-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.mjs
More file actions
69 lines (60 loc) · 1.6 KB
/
next.config.mjs
File metadata and controls
69 lines (60 loc) · 1.6 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
58
59
60
61
62
63
64
65
66
67
68
69
import { createMDX } from "fumadocs-mdx/next";
const withMDX = createMDX();
const isStaticExport = process.env.NEXT_STATIC_EXPORT === "true";
const isProd = process.env.NODE_ENV === "production";
console.debug("Next.js Configuration:");
console.debug(` isProd: ${isProd}`);
console.debug(` isStaticExport: ${isStaticExport}`);
// GitHub Pages configuration
const basePath =
process.env.NEXT_PUBLIC_BASE_PATH || (isProd ? "/plugins-doc-site" : "");
/** @type {import('next').NextConfig} */
const config = {
output: "export",
reactStrictMode: true,
trailingSlash: true,
skipTrailingSlashRedirect: true,
basePath: basePath,
assetPrefix: basePath,
images: {
unoptimized: true, // isStaticExport, // Only unoptimize for static export
remotePatterns: [
{
hostname: "github.com",
},
{
hostname: "shields.io",
},
{
hostname: "img.shields.io",
},
{
hostname: "demo.solutionforest.net",
},
{
hostname: "user-images.githubusercontent.com",
},
],
},
logging: {
fetches: {
fullUrl: true,
},
},
devIndicators: false,
reactDevOverlay: false,
productionBrowserSourceMaps: false,
// webpack: (config, { isServer }) => {
// // Prevent shiki from being externalized
// if (!isServer) {
// config.externals = config.externals || [];
// config.externals.push({
// shiki: 'shiki'
// });
// }
// return config;
// },
// // Alternative approach - mark shiki as not external
// serverExternalPackages: ['shiki'],
};
export default withMDX(config);