forked from MinaProtocol/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
43 lines (39 loc) · 946 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const path = require("path");
const withMDX = require("@next/mdx")({
options: {
remarkPlugins: [require("remark-slug"), require("remark-math")],
rehypePlugins: [
require("rehype-katex"),
[require("rehype-highlight"), { subset: false }],
],
},
});
const withTM = require("next-transpile-modules")([
"bs-platform",
"bs-css",
"bsc-stdlib-polyfill",
"bs-fetch",
]);
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
module.exports = withTM(
withBundleAnalyzer(
withMDX({
async exportPathMap(pages) {
return pages;
},
pageExtensions: ["jsx", "js", "mdx"],
webpack(config, options) {
config.resolve.alias["@reason"] = path.join(
__dirname,
"lib",
"es6",
"src"
);
config.resolve.extensions.push(".bs.js");
return config;
},
})
)
);