forked from SecureAI-Tools/SecureAI-Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
58 lines (54 loc) · 1.26 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
// TODO: Keep these in sync with routes in web/lib/fe/routes.ts
const LOG_IN = "/log-in";
const LOG_OUT = "/log-out";
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
// Disabled because the double renedering causes issues with chat interface!
// TODO(TECH-DEBT): Re-enable strict mode!
reactStrictMode: false,
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: [`@svgr/webpack`],
});
// https://github.com/wojtekmaj/react-pdf/issues/799#issuecomment-864887752
config.resolve.alias.canvas = false;
return config;
},
redirects: () => {
return [
{
source: "/sign-in",
destination: LOG_IN,
permanent: true,
},
{
source: "/signin",
destination: LOG_IN,
permanent: true,
},
{
source: "/login",
destination: LOG_IN,
permanent: true,
},
{
source: "/logout",
destination: LOG_OUT,
permanent: true,
},
{
source: "/sign-out",
destination: LOG_OUT,
permanent: true,
},
{
source: "/signout",
destination: LOG_OUT,
permanent: true,
},
];
},
};
module.exports = nextConfig;