From 606270db6d08fc227f96ef26b727e25f97bc28d1 Mon Sep 17 00:00:00 2001 From: markthree <1801982702@qq.com> Date: Sun, 30 Apr 2023 15:49:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=20netlify=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=BB=A5=E6=94=AF=E6=8C=81=E7=94=9F=E4=BA=A7=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=8B=E7=9A=84=20history=20=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/extensions.json | 4 +++- .vscode/settings.json | 5 ++++- netlify.toml | 4 ++++ src/composables/useVisits.ts | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 netlify.toml diff --git a/.vscode/extensions.json b/.vscode/extensions.json index b8d47d6..b39c5a7 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -13,6 +13,8 @@ "shd101wyy.markdown-preview-enhanced", "antfu.goto-alias", "voorjaar.windicss-intellisense", - "yoavbls.pretty-ts-errors" + "yoavbls.pretty-ts-errors", + "bodil.prettier-toml", + "bungcip.better-toml" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index d35f849..b49880b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,7 +21,7 @@ ".env": ".env.*", "index.html": "LICENSE,.gitignore,README.md", ".eslintrc.json": ".eslint*,.prettier*,.editor*", - "vite.config.*": "package.json,uno.config.ts,tsconfig.json" + "vite.config.*": "package.json,uno.config.ts,tsconfig.json,*.toml" }, "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" @@ -37,5 +37,8 @@ }, "[typescript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[toml]": { + "editor.defaultFormatter": "bodil.prettier-toml" } } diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..3a01cb0 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,4 @@ +[[redirects]] +to = "/index.html" +from = "/*" +status = 200 diff --git a/src/composables/useVisits.ts b/src/composables/useVisits.ts index 12967f3..ff45d59 100644 --- a/src/composables/useVisits.ts +++ b/src/composables/useVisits.ts @@ -16,7 +16,7 @@ export function useVisits() { const text = await res.text() return Number(text) ?? 0 } catch (error) { - console.log(error) + console.error(error) return 0 } })