1
1
// const webpack = require('webpack')
2
2
3
3
// next-plugins
4
- const withPlugins = require ( 'next-compose-plugins' )
5
- const withSourceMaps = require ( '@zeit/next-source-maps' ) ( )
6
- const withPWA = require ( 'next-pwa' )
4
+ // const withPlugins = require('next-compose-plugins')
5
+ // const withPWA = require('next-pwa')
7
6
8
7
const withBundleAnalyzer = require ( '@next/bundle-analyzer' ) ( {
9
8
enabled : process . env . ANALYZE === 'true' ,
@@ -12,23 +11,19 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
12
11
// next-plugins end
13
12
14
13
// if move pwa config to witPlugins, it will not work
15
- const nextConfig = withPWA ( {
16
- swcMinify : false ,
17
- productionBrowserSourceMaps : false ,
18
- pwa : {
19
- dest : 'public' ,
20
- disable : process . env . NODE_ENV !== 'production' ,
21
- register : true ,
22
- // scope: '/cp',
23
- sw : 'sw.js' ,
24
- } ,
25
- compiler : {
26
- // ssr and displayName are configured by default
27
- styledComponents : true ,
28
- } ,
14
+ const nextConfig = {
15
+ swcMinify : true ,
16
+ productionBrowserSourceMaps : true ,
17
+ // pwa: {
18
+ // dest: 'public',
19
+ // disable: process.env.NODE_ENV !== 'production',
20
+ // register: true,
21
+ // // scope: '/cp',
22
+ // sw: 'sw.js',
23
+ // },
29
24
// experimental: {
30
25
// outputStandalone: true,
31
26
// },
32
- } )
27
+ }
33
28
34
- module . exports = withPlugins ( [ withBundleAnalyzer , withSourceMaps ] , nextConfig )
29
+ module . exports = withBundleAnalyzer ( nextConfig )
0 commit comments