-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
37 lines (31 loc) · 889 Bytes
/
next.config.ts
File metadata and controls
37 lines (31 loc) · 889 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
32
33
34
35
36
37
import type { NextConfig } from 'next';
import { withMonacoEditor } from './scripts/monaco-plugin';
const nextConfig: NextConfig = {
// Enable static site generation with export
output: 'export',
// Trailing slash ensures python http.server serves index.html from directories
trailingSlash: true,
// Disable image optimization for static export (or use unoptimized: true)
images: {
unoptimized: true,
},
webpack: (config) => {
config.module.rules.push({
test: /\.md$/,
resourceQuery: /raw/,
type: 'asset/source',
});
return config;
},
// Configure Turbopack (Next.js 16+) to support raw markdown imports
turbopack: {
rules: {
'*.md': {
loaders: ['raw-loader'],
as: '*.js',
},
},
},
};
// Automatically copy Monaco Editor files during build/dev
export default withMonacoEditor(nextConfig);