-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
55 lines (42 loc) · 1.34 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
import { pipe } from "remeda";
import { tsImport } from "tsx/esm/api";
const require = id => tsImport(id, import.meta.filename);
const { withAssetFileLoader } = await require("./server/plugins/asset-file-loader");
const { withAutoImport } = await require("./server/plugins/auto-import");
const { withBlogConfigLoader } = await require("./server/plugins/blog-config-loader");
const { withBundleAnalyzer } = await require("./server/plugins/bundle-analyzer");
const { withDefinePlugin } = await require("./server/plugins/define-plugin");
const { withMdxFileLoader } = await require("./server/plugins/mdx-file-loader");
const { createDebugger } = await require("./utils/debug");
const debug = createDebugger("[next-config]");
const nextConfig = {
output: "export",
basePath: "",
images: {
unoptimized: true,
},
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
webpack: config => {
config.infrastructureLogging = {
level: "error",
};
return config;
},
};
debug.start("Load plugins");
const withPlugins = await pipe(
nextConfig,
withBlogConfigLoader,
withAutoImport,
withDefinePlugin,
withAssetFileLoader,
withMdxFileLoader,
withBundleAnalyzer,
);
debug.end("Load plugins");
export default withPlugins;