-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext.config.ts
More file actions
66 lines (57 loc) · 1.68 KB
/
next.config.ts
File metadata and controls
66 lines (57 loc) · 1.68 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// //import withPWA from "next-pwa";
// import type { NextConfig } from "next";
// // PWA 설정
// const pwaConfig = {
// dest: "public", // 서비스 워커가 저장될 경로
// register: true, // PWA 자동 등록
// skipWaiting: true, // 새로운 서비스 워커가 즉시 활성화되도록 설정
// disable: process.env.NODE_ENV === "development", // 개발 모드에서는 PWA 비활성화
// };
// const withPWA = require("next-pwa")({
// dest: "public",
// disable: process.env.NODE_ENV === "development",
// });
// // 기본 Next.js 설정
// const nextConfig: NextConfig = {
// reactStrictMode: true, // Next.js의 reactStrictMode는 기본 설정에서 관리
// compiler: {
// styledComponents: true,
// },
// images: {
// domains: ["storage.googleapis.com"],
// },
// };
// module.exports = withPWA(nextConfig);
// // PWA 설정을 nextConfig에 합침
// export default withPWA({
// ...nextConfig,
// ...pwaConfig, // PWA 관련 설정을 분리해서 추가
// });
import type { NextConfig } from "next";
const withPWA = require("next-pwa");
const pwaConfig = {
dest: "public",
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === "development",
};
const nextConfig: NextConfig = {
reactStrictMode: true,
compiler: {
styledComponents: true,
},
images: {
domains: ["storage.googleapis.com"],
},
};
module.exports = withPWA(pwaConfig)(nextConfig);
// const withPWA = require("next-pwa")({
// dest: "public",
// disable: process.env.NODE_ENV === "development",
// register: true,
// skipWaiting: true,
// });
// module.exports = withPWA({
// // 다른 Next.js 설정들
// reactStrictMode: true,
// });