-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support pwa, add bundle-analyzer #17
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
############################################# | ||
############ OIDC Server Configs ############ | ||
############################################# | ||
|
||
# oidc server url | ||
OIDC_SERVER_URL=[oidc_server_url]/oidc | ||
|
||
# oidc server client id && secret | ||
CLIENT_ID=client_id | ||
CLIENT_SECRET=client_secret | ||
|
||
# origin | ||
CLIENT_ORIGIN=http://localhost:3000 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. origin 本身是可以取到的,不需要配置,这个变量之前就有点儿犹豫是否必要,留下的主要考虑是:
@nkwangleiGIT 不考虑上述情况的话,这个变量可以省略 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 已经去掉, 服务端改为从 next/headers 中获取, 客户端 location.origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,9 @@ | |
"version": "0.1.0", | ||
"scripts": { | ||
"build": "next build", | ||
"build:analyze": "cross-env ANALYZE=true next build", | ||
"dev": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 next dev", | ||
"dev-https": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 next dev --experimental-https --experimental-https-key ./cert/key.pem --experimental-https-cert ./cert/cert.pem", | ||
"dev:https": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 next dev --experimental-https --experimental-https-key ./cert/key.pem --experimental-https-cert ./cert/cert.pem", | ||
"lint": "npm run lint:es && npm run lint:style", | ||
"lint-fix": "npm run lint-fix:es && npm run lint-fix:style", | ||
"lint-fix:es": "eslint --ext .jsx,.js,.tsx,.ts src --fix", | ||
|
@@ -13,7 +14,8 @@ | |
"lint:style": "stylelint \"{src,tests}/**/*.{css,less,js,jsx,ts,tsx}\"", | ||
"prepare": "husky install", | ||
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'", | ||
"start": "next start" | ||
"start": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 next start", | ||
"start:https": "cross-env NODE_ENV=production NODE_TLS_REJECT_UNAUTHORIZED=0 node server.mjs" | ||
}, | ||
"lint-staged": { | ||
"*.md": [ | ||
|
@@ -60,6 +62,8 @@ | |
"ua-parser-js": "2.0.0-alpha.2" | ||
}, | ||
"devDependencies": { | ||
"@ducanh2912/next-pwa": "^10.2.2", | ||
"@next/bundle-analyzer": "^14.1.0", | ||
"@types/mdx": "^2.0.10", | ||
"@types/node": "^20", | ||
"@types/query-string": "^6.3.0", | ||
|
@@ -77,7 +81,8 @@ | |
"remark": "^15.0.1", | ||
"remark-cli": "^12.0.0", | ||
"stylelint": "^15", | ||
"typescript": "^5" | ||
"typescript": "^5", | ||
"webpack": "^5.89.0" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要说明下,我们把请求中写死的 /oidc 去掉是因为 oidc_server_url 本身是带 /oidc 的,不是 oidc_server_url 地址后面要加个 /oidc,这里可以在备注里加个例子,比如 https://kubeagi.com/oidc