-
Notifications
You must be signed in to change notification settings - Fork 58
/
next.config.js
47 lines (42 loc) · 1.12 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
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");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
const GOOGLE_API_KEY =
process.env.GOOGLE_API_KEY || "AIzaSyDIFwMr7SPGCLl_o6e4UZKi1q9l8snkUZs";
module.exports = withTM(
withBundleAnalyzer(
withMDX({
async exportPathMap(pages) {
return pages;
},
pageExtensions: ["jsx", "js", "mdx"],
transpileModules: [
"bs-platform",
"bs-css",
"bsc-stdlib-polyfill",
"bs-fetch",
],
webpack(config, options) {
config.resolve.alias["@reason"] = path.join(
__dirname,
"lib",
"es6",
"src"
);
config.resolve.extensions.push(".bs.js");
return config;
},
env: {
GOOGLE_API_KEY: GOOGLE_API_KEY,
},
})
)
);