forked from XiaoMo/ChatGPT-Next-Web
feat: add app dev mode
This commit is contained in:
parent
184a0b9481
commit
80d5bfd7c0
@ -94,9 +94,14 @@ const useHasHydrated = () => {
|
||||
|
||||
const loadAsyncGoogleFont = () => {
|
||||
const linkEl = document.createElement("link");
|
||||
const proxyFontUrl = "/google-fonts";
|
||||
const remoteFontUrl = "https://fonts.googleapis.com";
|
||||
const googleFontUrl =
|
||||
getClientConfig()?.buildMode === "export" ? remoteFontUrl : proxyFontUrl;
|
||||
linkEl.rel = "stylesheet";
|
||||
linkEl.href =
|
||||
"/google-fonts/css2?family=Noto+Sans+SC:wght@300;400;700;900&display=swap";
|
||||
googleFontUrl +
|
||||
"/css2?family=Noto+Sans+SC:wght@300;400;700;900&display=swap";
|
||||
document.head.appendChild(linkEl);
|
||||
};
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"export": "BUILD_MODE=export yarn build",
|
||||
"export:dev": "BUILD_MODE=export yarn dev",
|
||||
"app:dev": "yarn tauri dev",
|
||||
"prompts": "node ./scripts/fetch-prompts.mjs",
|
||||
"prepare": "husky install",
|
||||
"proxy-dev": "sh ./scripts/init-proxy.sh && proxychains -f ./scripts/proxychains.conf yarn dev"
|
||||
|
@ -1,14 +1,14 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
||||
"build": {
|
||||
"beforeBuildCommand": "yarn build",
|
||||
"beforeDevCommand": "yarn dev",
|
||||
"beforeBuildCommand": "yarn export",
|
||||
"beforeDevCommand": "yarn export:dev",
|
||||
"devPath": "http://localhost:3000",
|
||||
"distDir": "../out"
|
||||
},
|
||||
"package": {
|
||||
"productName": "chatgpt-next-web",
|
||||
"version": "2.8"
|
||||
"version": "2.8.1"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
|
Loading…
Reference in New Issue
Block a user