forked from bitcoin-dev-project/bitcoin-dev-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
55 lines (54 loc) · 1.8 KB
/
next.config.js
File metadata and controls
55 lines (54 loc) · 1.8 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
/** @type {import('next').NextConfig} */
const { withContentlayer } = require("next-contentlayer2")
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true"
})
/**
* @type {import('next/dist/next-server/server/config').NextConfig}
**/
module.exports = () => {
const plugins = [withContentlayer, withBundleAnalyzer]
return plugins.reduce((acc, next) => next(acc), {
reactStrictMode: true,
transpilePackages: ["@bitcoin-dev-project/bdp-ui"],
pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"],
eslint: {
dirs: ["app", "components", "layouts", "scripts"]
},
images: {
domains: ["avatars.githubusercontent.com"]
},
async redirects() {
return [
{
source: "/grants/:path*",
destination: "https://grants.bitcoindevs.xyz/:path*",
permanent: false
},
{
source: "/grants",
destination: "https://grants.bitcoindevs.xyz/",
permanent: false
},
{
source: "/blog/20251202_GlowUp",
destination:
"https://medium.com/@bitcoindevs/glow-up-95008146d653",
permanent: false
}
]
},
async rewrites() {
return [
{
source: "/api/:path*",
destination: "https://grants.bitcoindevs.xyz/api/:path*"
},
{
source: "/logos/:path*",
destination: "https://grants.bitcoindevs.xyz/logos/:path*"
}
]
}
})
}