11// const webpack = require('webpack')
22
33// 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')
76
87const withBundleAnalyzer = require ( '@next/bundle-analyzer' ) ( {
98 enabled : process . env . ANALYZE === 'true' ,
@@ -12,23 +11,19 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
1211// next-plugins end
1312
1413// 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+ // },
2924 // experimental: {
3025 // outputStandalone: true,
3126 // },
32- } )
27+ }
3328
34- module . exports = withPlugins ( [ withBundleAnalyzer , withSourceMaps ] , nextConfig )
29+ module . exports = withBundleAnalyzer ( nextConfig )
0 commit comments