-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
next.config.js
43 lines (41 loc) · 1 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
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
flexsearch: {
codeblocks: true,
},
staticImage: true,
contentDump: true,
defaultShowCopyCode: true,
});
/** @type {import('next').NextConfig} */
const config = {
i18n: {
locales: ['en-UZ'],
defaultLocale: 'en-UZ',
},
reactStrictMode: true,
typescript: {
// Disable type checking since eslint handles this
ignoreBuildErrors: true,
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'raw.githubusercontent.com',
port: '',
pathname: '/devops-journey-uz/**',
},
],
},
};
if (process.env.NODE_ENV === 'development') {
const withPreconstruct = require('@preconstruct/next');
module.exports = withPreconstruct(withNextra(config));
} else {
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
module.exports = withBundleAnalyzer(withNextra(config));
}