-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
45 lines (40 loc) · 1.09 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
require("dotenv").config();
const nextTranslate = require("next-translate");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
module.exports = withBundleAnalyzer(
nextTranslate({
webpack: (config) => {
config.module.rules.push(
{
test: /\.svg$/i,
type: "asset",
resourceQuery: /url/, // *.svg?url
},
{
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
resourceQuery: { not: [/url/] }, // exclude react component if *.svg?url
use: ["@svgr/webpack"],
}
);
config.resolve.alias["cldr$"] = "cldrjs";
config.resolve.alias["cldr"] = "cldrjs/dist/cldr";
return config;
},
images: {
domains: ["uchuu.ensemble.moe", "assets.enstars.link"],
},
pageExtensions: ["page.tsx", "page.ts", "page.jsx", "page.js"],
async redirects() {
return [
{
source: "/issues/form",
destination: "https://forms.gle/W2oLnbUeTBJm647R9",
permanent: false,
},
];
},
})
);