-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
48 lines (41 loc) · 1.09 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
39
40
41
42
43
44
45
46
47
48
// next.config.mjs
import { createVanillaExtractPlugin } from "@vanilla-extract/next-plugin";
const withVanillaExtract = createVanillaExtractPlugin();
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config, { isServer }) => {
// 캐시 설정 최적화
config.cache = {
type: 'filesystem',
buildDependencies: {
config: [import.meta.url]
},
name: `${isServer ? 'server' : 'client'}-development`,
version: '1.0'
};
// vanilla-extract 컴파일 최적화
config.infrastructureLogging = {
level: 'error'
};
// 개발 모드에서의 성능 최적화
if (process.env.NODE_ENV === 'development') {
config.watchOptions = {
ignored: ['**/node_modules', '**/.next']
};
}
return config;
},
// 추가 성능 최적화 옵션
swcMinify: true,
reactStrictMode: true,
// 이미지 설정 추가
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'afill-back.hash-squad.kro.kr'
}
]
}
};
export default withVanillaExtract(nextConfig);