-
Notifications
You must be signed in to change notification settings - Fork 4
/
next.config.mjs
85 lines (83 loc) · 2.3 KB
/
next.config.mjs
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import nextMDX from "@next/mdx";
import withPlugins from "next-compose-plugins";
import path from "path";
const ESM_PACKAGES = [
"axios",
"@databiosphere/findable-ui",
"@tanstack/react-table",
];
const withMDX = nextMDX({
extension: /\.mdx?$/,
});
export default withPlugins(
[[withMDX, { pageExtensions: ["md", "mdx", "ts", "tsx"] }]],
{
basePath: "",
// distDir: "out/data",
experimental: {
instrumentationHook: true,
},
images: {
unoptimized: true,
},
output: "export",
reactStrictMode: true,
transpilePackages: [...ESM_PACKAGES],
webpack: (config) => {
// Add the alias for the peer dependency
config.resolve.alias["@emotion/react"] = path.resolve(
process.cwd(),
"node_modules/@emotion/react"
);
config.resolve.alias["@emotion/styled"] = path.resolve(
process.cwd(),
"node_modules/@emotion/styled"
);
config.resolve.alias["@mui/icons-material"] = path.resolve(
process.cwd(),
"node_modules/@mui/icons-material"
);
config.resolve.alias["@mui/material"] = path.resolve(
process.cwd(),
"node_modules/@mui/material"
);
config.resolve.alias["react-dropzone"] = path.resolve(
process.cwd(),
"node_modules/react-dropzone"
);
config.resolve.alias["isomorphic-dompurify"] = path.resolve(
process.cwd(),
"node_modules/isomorphic-dompurify"
);
config.resolve.alias["next"] = path.resolve(
process.cwd(),
"node_modules/next"
);
config.resolve.alias["react"] = path.resolve(
process.cwd(),
"node_modules/react"
);
config.resolve.alias["react-dom"] = path.resolve(
process.cwd(),
"node_modules/react-dom"
);
config.resolve.alias["react-gtm-module"] = path.resolve(
process.cwd(),
"node_modules/react-gtm-module"
);
config.resolve.alias["react-window"] = path.resolve(
process.cwd(),
"node_modules/react-window"
);
config.resolve.alias["uuid"] = path.resolve(
process.cwd(),
"node_modules/uuid"
);
config.resolve.alias["validate.js"] = path.resolve(
process.cwd(),
"node_modules/validate.js"
);
return config;
},
}
);