-
Notifications
You must be signed in to change notification settings - Fork 37
/
next.config.js
44 lines (44 loc) · 1.05 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
/** @type {import('next').NextConfig} */
const removeImports = require("next-remove-imports")();
module.exports = removeImports({
publicRuntimeConfig: {
DISABLE_AUTH: process.env.DISABLE_AUTH,
QE_BASEPATH: process.env.QE_BASEPATH,
},
experimental: { esmExternals: true },
basePath: process.env.QE_BASEPATH,
reactStrictMode: true,
async redirects() {
if (this.basePath === "") {
return [
{
source: "/",
destination: "/nodes",
basePath: false,
permanent: false,
},
];
} else {
return [
{
source: "/",
destination: this.basePath + "/nodes",
basePath: false,
permanent: false,
},
{
source: "/api/:path*",
destination: this.basePath + "/api/:path*",
basePath: false,
permanent: false,
},
{
source: this.basePath,
destination: this.basePath + "/nodes",
basePath: false,
permanent: false,
},
];
}
},
});