on 4fdc19d help sign in
urbit.org/next.config.js
69 lines 1.9 kB history raw
1const withTM = require("next-transpile-modules")([
2 "remark-parse",
3 "remark-gfm",
4 "remark-rehype",
5 "rehype-stringify",
6 "rehype-raw",
7 "micromark-core-commonmark",
8 "micromark-extension-gfm",
9 "micromark-util-combine-extensions",
10 "micromark-util-chunked",
11 "micromark-util-character",
12 "micromark-util-sanitize-uri",
13 "micromark-util-encode",
14 "micromark-util-classify-character",
15 "micromark-util-resolve-all",
16 "micromark-util-subtokenize",
17 "micromark-util-normalize-identifier",
18 "micromark-util-html-tag-name",
19 "micromark-util-decode-numeric-character-reference",
20 "micromark-util-decode-string",
21 "micromark-factory-destination",
22 "micromark-factory-label",
23 "micromark-factory-space",
24 "micromark-factory-title",
25 "micromark-factory-whitespace",
26 "mdast-util-gfm",
27 "ccount",
28 "mdast-util-find-and-replace",
29 "hast-util-raw",
30 "hast-util-from-parse5",
31 "hast-util-to-parse5",
32 "hast-util-parse-selector",
33 "hast-to-hyperscript",
34 "hastscript",
35 "unist-util-visit-parents",
36 "unist-util-is",
37 "vfile-location",
38 "web-namespaces",
39 "mdast-util-to-markdown",
40 "mdast-util-from-markdown",
41 "markdown-table",
42]);
44module.exports = withTM({
45 reactStrictMode: false,
46 // target: 'serverless',
47 webpack: (config, { isServer }) => {
48 // Fixes npm packages that depend on `fs` module
49 if (!isServer) {
50 config.resolve.fallback = {
51 fs: false,
52 path: "path-browserify",
53 events: false,
54 };
55 }
56 if (isServer) {
57 config.externals.push("_http_common");
58 }
59 config.resolve.alias.stream = "stream-browserify";
60 config.resolve.alias.zlib = "browserify-zlib";
61 // config.externals = {
62 // ...config.externals,
63 // canvas: "util",
64 // bufferutil: "bufferutil",
65 // "utf-8-validate": "utf-8-validate"
66 // }
67 return config;
68 },
69});