-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
liyuhang
committed
Feb 22, 2024
1 parent
208ef44
commit 307cf43
Showing
16 changed files
with
378 additions
and
618 deletions.
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 |
---|---|---|
|
@@ -3,3 +3,5 @@ VITE_PORT = 20000 | |
|
||
# Basic interface address | ||
VITE_API_URL=/api/ | ||
|
||
VITE_GLOB_APP_TITLE=TEC-VUE-STARTER |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# Whether to open mock | ||
VITE_USE_MOCK = true | ||
|
||
VITE_ENABLE_ANALYZE = false | ||
|
||
# Proxy | ||
VITE_PROXY_HOST=http://127.0.0.1:20001/api |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* @Description: Copyright (c) ydfk. All rights reserved | ||
* @Author: ydfk | ||
* @Date: 2024-02-22 15:11:23 | ||
* @LastEditors: ydfk | ||
* @LastEditTime: 2024-02-22 15:19:27 | ||
*/ | ||
import { viteMockServe } from "vite-plugin-mock"; | ||
|
||
export function configMockPlugin({ isBuild }: { isBuild: boolean }) { | ||
return viteMockServe({ | ||
ignore: /^_/, | ||
mockPath: "mock", | ||
localEnabled: !isBuild, | ||
prodEnabled: isBuild, | ||
injectCode: ` | ||
import { setupProdMockServer } from '../mock/_createProductionServer'; | ||
setupProdMockServer(); | ||
`, | ||
}); | ||
} |
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
Oops, something went wrong.