-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathnext.config.ts
51 lines (48 loc) · 1013 Bytes
/
next.config.ts
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
import type { NextConfig } from 'next'
import { withContentCollections } from '@content-collections/next'
import withBundleAnalyzer from '@next/bundle-analyzer'
let nextConfig: NextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'cx-onedrive.pages.dev',
pathname: '**',
},
],
},
async rewrites() {
return [
{
source: '/rss',
destination: '/feed',
},
{
source: '/atom',
destination: '/feed',
},
{
source: '/rss.xml',
destination: '/feed',
},
{
source: '/atom.xml',
destination: '/feed',
},
{
source: '/feed.xml',
destination: '/feed',
},
{
source: '/sitemap',
destination: '/sitemap.xml',
},
]
},
}
if (process.env.ANALYZE === 'true') {
nextConfig = withBundleAnalyzer({
enabled: true,
})(nextConfig)
}
export default withContentCollections(nextConfig)