-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnext.config.js
43 lines (37 loc) · 915 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 isProd = process.env.NODE_ENV === 'production';
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
images: {
formats: ['image/avif', 'image/webp'],
// Twitch / Contentful / Youtube
domains: ['static-cdn.jtvnw.net', 'images.ctfassets.net', 'i.ytimg.com'],
minimumCacheTTL: 600,
},
productionBrowserSourceMaps: true,
i18n: {
locales: ['en'],
defaultLocale: 'en',
},
compiler: {
removeConsole: isProd,
},
};
module.exports = {
webpack5: true,
webpack: (config) => {
config.resolve.fallback = { fs: false };
return config;
},
};
/* module.exports = nextConfig; */
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
options: {
remarkPlugins: [],
rehypePlugins: [],
providerImportSource: '@mdx-js/react',
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
},
});
module.exports = withMDX(nextConfig);