Skip to content

Commit 5dfcb1f

Browse files
committed
[optimize] update build lark baseURI
1 parent 640eb19 commit 5dfcb1f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

models/Base.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ const API_Host = isServer()
1212
: 'http://localhost:3000'
1313
: globalThis.location.origin;
1414

15+
const { BUILDING } = process.env;
16+
1517
export const larkClient = new HTTPClient({
16-
baseURI: `${API_Host}/api/Lark/`,
18+
baseURI: BUILDING
19+
? 'https://open.feishu.cn/open-apis/'
20+
: `${API_Host}/api/Lark/`,
1721
responseType: 'json',
1822
});
1923

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
"scripts": {
5454
"prepare": "husky install",
5555
"dev": "next dev",
56-
"build": "next build",
57-
"export": "next build && next export",
56+
"build": "BUILDING=1 next build",
57+
"export": "BUILDING=1 next build && next export",
5858
"start": "next start",
5959
"lint": "next lint",
6060
"test": "lint-staged && npm run lint",

0 commit comments

Comments
 (0)