-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathnext.config.js
48 lines (47 loc) · 1.3 KB
/
next.config.js
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
const withDwollaMdx = require("dwolla-mdx-remark");
const withImages = require("next-images");
const { PHASE_DEVELOPMENT_SERVER } = require("next/constants");
const withYaml = require("next-plugin-yaml");
module.exports = (phase) =>
withYaml(
withImages(
withDwollaMdx({
extension: /\.mdx?$/,
options: {
providerImportSource: "@mdx-js/react",
},
})({
env: {
isDev: phase === PHASE_DEVELOPMENT_SERVER,
},
images: {
disableStaticImages: true,
},
pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"],
redirects: async () => [
{
source: "/",
destination: "/docs",
permanent: true,
},
{
source: "/docs/balance/api-reference",
destination: "/docs/balance/api-reference/api-fundamentals",
permanent: true,
},
{
source: "/docs/connect/api-reference",
destination: "/docs/connect/api-reference/api-fundamentals",
permanent: true,
},
],
webpack: (config) => {
config.module.rules.unshift({
test: /\.svg$/,
use: ["@svgr/webpack"],
});
return config;
},
})
)
);