Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
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
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ tsconfig.tsbuildinfo
*.css
./deploy*
*.tar.gz
*.xml
*.xml
public/*
4 changes: 2 additions & 2 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"ICON_CMD": "https://assets.coderplanets.com/icons/cmd",
"DEFAULT_ICON": "https://assets.coderplanets.com/icons/cmd/cheatsheet.svg",
"DEFAULT_USER_AVATAR": "https://assets.coderplanets.com/icons/cmd/alien_user3.svg",
"GRAPHQL_ENDPOINT": "http://localhost:4001/graphiql",
"GRAPHQL_ENDPOINT": "https://api.coderplanets.com/graphiql",
"SITE_URL": "https://coderplanets.com",
"SITE_URL_SHORT": "https://coderplanets.com",
"GITHUB": "https://github.com/coderplanets",
Expand All @@ -59,7 +59,7 @@
"//--- contact configs ---//": "",
"EMAIL_SUPPORT": "coderplanets@outlook.com",
"// GRAPHQL_ENDPOINT": "https://api.coderplanets.com/graphiql",
"BUILD_VERSION": "v2.0.98",
"BUILD_VERSION": "v2.0.99",
"// 1000 * 60 * 10 = 10 mins": "",
"SSR_CACHE_TIME": 60000
}
Binary file modified deploy/production/web.tar.gz
Binary file not shown.
29 changes: 12 additions & 17 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,22 @@ const withPlugins = require('next-compose-plugins')
const withSourceMaps = require('@zeit/next-source-maps')()
const withPWA = require('next-pwa')

// const withOffline = require('next-offline')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
// const offlineConfig = require('./config/next_offline')

// next-plugins end

const nextConfig = {}
// if move pwa config to witPlugins, it will not work
const nextConfig = withPWA({
productionBrowserSourceMaps: false,
pwa: {
dest: 'public',
disable: process.env.NODE_ENV !== 'production',
register: true,
// scope: '/cp',
sw: 'sw.js',
},
})

module.exports = withPlugins(
// [withBundleAnalyzer, withSourceMaps, [withOffline, offlineConfig]],
[
[
withPWA,
{
dest: 'public',
},
],
withBundleAnalyzer,
withSourceMaps,
],
nextConfig,
)
module.exports = withPlugins([withBundleAnalyzer, withSourceMaps], nextConfig)
Loading