-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
41 lines (36 loc) · 1.02 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
/** @type {import('next').NextConfig} */
/* eslint-env node */
// https://github.com/vercel/next.js/blob/master/packages/next/next-server/server/config.ts
const nextConfig = {
webpack: (config) => {
const oneOfRule = config.module.rules.find((rule) => rule.oneOf);
// Next 12 has multiple TS loaders, and we need to update all of them.
const tsRules = oneOfRule.oneOf.filter(
(rule) => rule.test && rule.test.toString().includes("tsx|ts")
);
tsRules.forEach((rule) => {
// eslint-disable-next-line no-param-reassign
rule.include = undefined;
});
return config;
},
compress: true,
experimental: {
appDir: true,
},
generateEtags: true,
output: "standalone",
pageExtensions: ["tsx", "mdx", "ts"],
poweredByHeader: false,
productionBrowserSourceMaps: false,
swcMinify: true,
trailingSlash: false,
images: {
domains: [
"avatars.githubusercontent.com",
"raw.githubusercontent.com",
"octodex.github.com",
],
},
};
module.exports = nextConfig;