Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit5ee69f6

Browse files
authored
refactor(serve): use next.js build-in serve (#1239)
* chore(next-dev): use build in dev* refactor(serve): use nextjs's build-in serve with SSR cache test* chore(deploy): bump version to v2.0.99
1 parentb9a4c76 commit5ee69f6

File tree

13 files changed

+4565
-47
lines changed

13 files changed

+4565
-47
lines changed

‎.eslintignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ tsconfig.tsbuildinfo
1515
*.css
1616
./deploy*
1717
*.tar.gz
18-
*.xml
18+
*.xml
19+
public/*

‎config/config.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"ICON_CMD":"https://assets.coderplanets.com/icons/cmd",
4949
"DEFAULT_ICON":"https://assets.coderplanets.com/icons/cmd/cheatsheet.svg",
5050
"DEFAULT_USER_AVATAR":"https://assets.coderplanets.com/icons/cmd/alien_user3.svg",
51-
"GRAPHQL_ENDPOINT":"http://localhost:4001/graphiql",
51+
"GRAPHQL_ENDPOINT":"https://api.coderplanets.com/graphiql",
5252
"SITE_URL":"https://coderplanets.com",
5353
"SITE_URL_SHORT":"https://coderplanets.com",
5454
"GITHUB":"https://github.com/coderplanets",
@@ -59,7 +59,7 @@
5959
"//--- contact configs ---//":"",
6060
"EMAIL_SUPPORT":"coderplanets@outlook.com",
6161
"// GRAPHQL_ENDPOINT":"https://api.coderplanets.com/graphiql",
62-
"BUILD_VERSION":"v2.0.98",
62+
"BUILD_VERSION":"v2.0.99",
6363
"// 1000 * 60 * 10 = 10 mins":"",
6464
"SSR_CACHE_TIME":60000
6565
}

‎deploy/production/web.tar.gz‎

95.3 KB
Binary file not shown.

‎next.config.js‎

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,22 @@ const withPlugins = require('next-compose-plugins')
55
constwithSourceMaps=require('@zeit/next-source-maps')()
66
constwithPWA=require('next-pwa')
77

8-
// const withOffline = require('next-offline')
98
constwithBundleAnalyzer=require('@next/bundle-analyzer')({
109
enabled:process.env.ANALYZE==='true',
1110
})
12-
// const offlineConfig = require('./config/next_offline')
1311

1412
// next-plugins end
1513

16-
constnextConfig={}
14+
// if move pwa config to witPlugins, it will not work
15+
constnextConfig=withPWA({
16+
productionBrowserSourceMaps:false,
17+
pwa:{
18+
dest:'public',
19+
disable:process.env.NODE_ENV!=='production',
20+
register:true,
21+
// scope: '/cp',
22+
sw:'sw.js',
23+
},
24+
})
1725

18-
module.exports=withPlugins(
19-
// [withBundleAnalyzer, withSourceMaps, [withOffline, offlineConfig]],
20-
[
21-
[
22-
withPWA,
23-
{
24-
dest:'public',
25-
},
26-
],
27-
withBundleAnalyzer,
28-
withSourceMaps,
29-
],
30-
nextConfig,
31-
)
26+
module.exports=withPlugins([withBundleAnalyzer,withSourceMaps],nextConfig)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp