-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
48 lines (45 loc) · 1.28 KB
/
next.config.js
File metadata and controls
48 lines (45 loc) · 1.28 KB
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
/* eslint-disable import/no-extraneous-dependencies */
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
const remarkGfm = require("remark-gfm");
const rehypeHighlight = require("rehype-highlight");
const withMDX = require("@next/mdx")({
extension: /\.mdx?$/,
options: {
remarkPlugins: [remarkGfm],
rehypePlugins: [rehypeHighlight],
},
});
const baseUrl = "";
module.exports = withMDX(
withBundleAnalyzer({
poweredByHeader: false,
trailingSlash: true,
basePath: baseUrl,
env: {
baseUrl,
},
compiler: {
// Use SWC for styled-components so we can remove Babel
styledComponents: true,
},
// The starter code load resources from `public` folder with `router.basePath` in React components.
// So, the source code is "basePath-ready".
// You can remove `basePath` if you don't need it.
reactStrictMode: true,
transpilePackages: ["react-tweet"],
pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"],
images: {
// fixes build error (see commit message for details)
unoptimized: true,
remotePatterns: [
{
protocol: "https",
hostname: "pbs.twimg.com",
pathname: "/**",
},
],
},
}),
);