-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
41 lines (38 loc) · 1.05 KB
/
next.config.mjs
File metadata and controls
41 lines (38 loc) · 1.05 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
import { withContentlayer } from 'next-contentlayer2'
import bundleAnalyzer from '@next/bundle-analyzer'
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
})
/** @type {import('next').NextConfig} */
const nextConfig = {
output: process.env.NODE_ENV === 'production' ? 'export' : undefined,
reactStrictMode: true,
// Compress and minify JavaScript
compiler: {
removeConsole: process.env.NODE_ENV === 'production',
},
images: {
// Required for static export
unoptimized: true,
remotePatterns: [
{
protocol: 'https',
hostname: 'image.yes24.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'images.unsplash.com',
},
],
},
// Enable experimental features for better performance
experimental: {
// optimizeCss: true, // Disabled due to critters module issues
},
// Performance optimizations
poweredByHeader: false,
generateEtags: false,
compress: true,
}
export default withBundleAnalyzer(withContentlayer(nextConfig))