-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
59 lines (55 loc) · 1.42 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
const fs = require("fs");
const path = require("path");
const packagesToPatch = ["animated", "core", "konva", "native", "shared", "three", "web", "zdog"];
packagesToPatch.forEach(patchPackage);
function patchPackage(package) {
const packageJsonPath = path.join("node_modules", "@react-spring", package, "package.json");
const packageJson = fs.readFileSync(packageJsonPath, "utf-8");
const modifiedPackageJson = packageJson.replace('"sideEffects": false,', "");
fs.writeFileSync(packageJsonPath, modifiedPackageJson, {
encoding: "utf-8",
});
}
module.exports = {
async redirects() {
return [
{
source: "/password",
destination: "/password/request-change",
permanent: true,
},
{
source: "/register",
destination: "/",
permanent: true,
},
{
source: "/register/onboarding",
destination: "/",
permanent: true,
},
{
source: "/register/verify-email",
destination: "/",
permanent: true,
},
{
source: "/events/from-employees",
destination: "/events",
permanent: true,
},
];
},
target: "serverless",
webpack: (config) => {
config.module.rules.push({
test: /\.(graphql|gql)$/,
exclude: /node_modules/,
loader: "graphql-tag/loader",
});
return config;
},
webpackDevMiddleware: (config) => {
return config;
},
};