-
Notifications
You must be signed in to change notification settings - Fork 466
/
Copy pathnext.config.js
95 lines (93 loc) · 2.18 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
const path = require("path");
const { globSync } = require("glob");
const compareVersions = require("compare-versions");
module.exports = {
webpack: (config, options) => {
config.module.rules.push({
test: /\.mjs/,
include: /node_modules/,
type: "javascript/auto",
});
return config;
},
// Next.js config
async redirects() {
return [
{
source: "/case-studies/:slug*",
destination: "/primitives/case-studies/:slug*",
permanent: true,
},
{
source: "/colors/docs",
destination: "/colors/docs/overview/installation",
permanent: true,
},
{
source: "/colors/docs/tests/:slug*",
destination: "/colors",
permanent: true,
},
{
source: "/docs/colors/palette-composition/the-scales",
destination: "/colors/docs/palette-composition/scales",
permanent: true,
},
{
source: "/docs/colors/getting-started/:slug*",
destination: "/colors/docs/overview/:slug*",
permanent: true,
},
{
source: "/docs/colors/:slug*",
destination: "/colors/docs/:slug*",
permanent: true,
},
{
source: "/docs/primitives",
destination: "/primitives/docs/overview/introduction",
permanent: false,
},
{
source: "/docs/primitives/utilities/aspect-ratio/:slug*",
destination: "/primitives/docs/components/aspect-ratio",
permanent: true,
},
{
source: "/docs/primitives/utilities/label/:slug*",
destination: "/primitives/docs/components/label",
permanent: true,
},
{
source: "/primitives/docs/components/:slug/:version",
destination: "/primitives/docs/components/:slug",
permanent: true,
},
{
source: "/primitives/docs/utilities/:slug/:version",
destination: "/primitives/docs/utilities/:slug",
permanent: true,
},
{
source: "/docs/primitives/:slug*",
destination: "/primitives/docs/:slug*",
permanent: true,
},
{
source: "/primitives/docs",
destination: "/primitives/docs/overview/introduction",
permanent: false,
},
{
source: "/themes",
destination: "/",
permanent: false,
},
{
source: "/themes/docs",
destination: "/themes/docs/overview/getting-started",
permanent: false,
},
];
},
};