forked from urbit/urbit.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
63 lines (62 loc) · 1.59 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
56
57
58
59
60
61
62
63
const withTM = require("next-transpile-modules")([
"remark-parse",
"remark-gfm",
"remark-rehype",
"rehype-stringify",
"rehype-raw",
"micromark-core-commonmark",
"micromark-extension-gfm",
"micromark-util-combine-extensions",
"micromark-util-chunked",
"micromark-util-character",
"micromark-util-sanitize-uri",
"micromark-util-encode",
"micromark-util-classify-character",
"micromark-util-resolve-all",
"micromark-util-subtokenize",
"micromark-util-normalize-identifier",
"micromark-util-html-tag-name",
"micromark-util-decode-numeric-character-reference",
"micromark-util-decode-string",
"micromark-factory-destination",
"micromark-factory-label",
"micromark-factory-space",
"micromark-factory-title",
"micromark-factory-whitespace",
"mdast-util-gfm",
"ccount",
"mdast-util-find-and-replace",
"hast-util-raw",
"hast-util-from-parse5",
"hast-util-to-parse5",
"hast-util-parse-selector",
"hast-to-hyperscript",
"hastscript",
"unist-util-visit-parents",
"unist-util-is",
"vfile-location",
"web-namespaces",
"mdast-util-to-markdown",
"mdast-util-from-markdown",
"markdown-table",
]);
module.exports = withTM({
reactStrictMode: false,
// target: 'serverless',
webpack5: false,
webpack: (config, { isServer }) => {
// Fixes npm packages that depend on `fs` module
if (!isServer) {
config.node = {
fs: "empty",
};
}
// config.externals = {
// ...config.externals,
// canvas: "util",
// bufferutil: "bufferutil",
// "utf-8-validate": "utf-8-validate"
// }
return config;
},
});