File tree 1 file changed +15
-13
lines changed
1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -9,18 +9,6 @@ const API_PROXY_ENDPOINT = process.env.API_PROXY_ENDPOINT || '';
9
9
10
10
const basePath = process . env . NEXT_PUBLIC_BASE_PATH ;
11
11
12
- const withBundleAnalyzer = analyzer ( {
13
- enabled : process . env . ANALYZE === 'true' ,
14
- } ) ;
15
-
16
- const withPWA = nextPWA ( {
17
- dest : 'public' ,
18
- register : true ,
19
- workboxOptions : {
20
- skipWaiting : true ,
21
- } ,
22
- } ) ;
23
-
24
12
/** @type {import('next').NextConfig } */
25
13
const nextConfig = {
26
14
compress : isProd ,
@@ -67,4 +55,18 @@ const nextConfig = {
67
55
} ,
68
56
} ;
69
57
70
- export default isProd ? withBundleAnalyzer ( withPWA ( nextConfig ) ) : nextConfig ;
58
+ const noWrapper = ( config ) => config ;
59
+
60
+ const withBundleAnalyzer = process . env . ANALYZE === 'true' ? analyzer ( ) : noWrapper ;
61
+
62
+ const withPWA = isProd
63
+ ? nextPWA ( {
64
+ dest : 'public' ,
65
+ register : true ,
66
+ workboxOptions : {
67
+ skipWaiting : true ,
68
+ } ,
69
+ } )
70
+ : noWrapper ;
71
+
72
+ export default withBundleAnalyzer ( withPWA ( nextConfig ) ) ;
You can’t perform that action at this time.
0 commit comments