-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathnext.config.mjs
More file actions
61 lines (56 loc) · 1.63 KB
/
Copy pathnext.config.mjs
File metadata and controls
61 lines (56 loc) · 1.63 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
import { withNextVideo } from 'next-video/process'
import createMDX from '@next/mdx'
import remarkGfm from 'remark-gfm'
import remarkFrontmatter from 'remark-frontmatter'
import remarkMdxFrontmatter from 'remark-mdx-frontmatter'
import rehypeSlug from 'rehype-slug'
import remarkCodeMeta from './src/lib/remark-code-meta.mjs'
import remarkDocsLayout from './src/lib/remark-docs-layout.mjs'
import withSearch from './src/lib/search.mjs'
const withMDX = createMDX({
extension: /\.mdx?$/,
options: {
remarkPlugins: [
remarkGfm,
remarkFrontmatter,
[remarkMdxFrontmatter, { name: 'frontmatter' }],
remarkCodeMeta,
remarkDocsLayout,
],
rehypePlugins: [rehypeSlug],
},
})
/** @type {import('next').NextConfig} */
const nextConfig = {
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
productionBrowserSourceMaps: true,
async rewrites() {
return [
// Agent-readiness discovery endpoints. We host the routes under
// /well-known/* (Next.js does not include `.`-prefixed folders in the
// app-router route tree) and rewrite the canonical /.well-known/*
// paths so RFC compliance still holds.
{
source: '/.well-known/:path*',
destination: '/well-known/:path*',
},
]
},
async redirects() {
return [
{
source: '/',
destination: '/basics/replay-qa/overview',
permanent: false,
},
{
source: '/getting-started/record-your-first-replay',
destination: '/quickstart',
permanent: true,
},
]
},
}
export default withNextVideo(withSearch(withMDX(nextConfig)), {
folder: 'src/videos',
})