generated from yearn/web-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
executable file
·29 lines (27 loc) · 931 Bytes
/
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
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable no-undef */
const withTM = require("next-transpile-modules")(["@yearn-finance/web-lib"]);
const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.js",
unstable_contentDump: true,
unstable_flexsearch: true,
unstable_staticImage: true,
});
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
typescript: {
// Disable type checking since eslint handles this
ignoreBuildErrors: true,
},
};
if (process.env.NODE_ENV === "development") {
const withPreconstruct = require("@preconstruct/next");
module.exports = withPreconstruct(withTM(withNextra(config)));
} else {
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
module.exports = withBundleAnalyzer(withTM(withNextra(config)));
}