Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

chore(deps): upgrade main pkgs 2022 9 #1368

Merged
merged 2 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 14 additions & 19 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// const webpack = require('webpack')

// next-plugins
const withPlugins = require('next-compose-plugins')
const withSourceMaps = require('@zeit/next-source-maps')()
const withPWA = require('next-pwa')
// const withPlugins = require('next-compose-plugins')
// const withPWA = require('next-pwa')

const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
Expand All @@ -12,23 +11,19 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
// next-plugins end

// if move pwa config to witPlugins, it will not work
const nextConfig = withPWA({
swcMinify: false,
productionBrowserSourceMaps: false,
pwa: {
dest: 'public',
disable: process.env.NODE_ENV !== 'production',
register: true,
// scope: '/cp',
sw: 'sw.js',
},
compiler: {
// ssr and displayName are configured by default
styledComponents: true,
},
const nextConfig = {
swcMinify: true,
productionBrowserSourceMaps: true,
// pwa: {
// dest: 'public',
// disable: process.env.NODE_ENV !== 'production',
// register: true,
// // scope: '/cp',
// sw: 'sw.js',
// },
// experimental: {
// outputStandalone: true,
// },
})
}

module.exports = withPlugins([withBundleAnalyzer, withSourceMaps], nextConfig)
module.exports = withBundleAnalyzer(nextConfig)
Loading