-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
38 lines (34 loc) · 1.08 KB
/
next.config.mjs
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
import { fileURLToPath } from 'node:url'
import { createJiti } from 'jiti'
import createNextIntlPlugin from 'next-intl/plugin'
const withNextIntl = createNextIntlPlugin('./src/core/i18n/i18n.ts')
const jiti = createJiti(fileURLToPath(import.meta.url))
const { serverEnvs } = await jiti.import('./src/env/server')
await jiti.import('./src/env/client')
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: config => {
config.externals.push('pino-pretty', 'lokijs', 'encoding')
return config
},
transpilePackages: ['jotai-devtools'],
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'xelene.me',
},
],
},
swcMinify: true,
reactStrictMode: true,
typescript: {
// Set this to false if you want production builds to abort if there's type errors
ignoreBuildErrors: serverEnvs.NODE_ENV === 'production',
},
eslint: {
/// Set this to false if you want production builds to abort if there's lint errors
ignoreDuringBuilds: serverEnvs.NODE_ENV === 'production',
},
}
export default withNextIntl(nextConfig)