From e16d0cadb46f52dbee51572a0821ecb0c2d3ea68 Mon Sep 17 00:00:00 2001 From: jiyuujin Date: Sun, 28 Apr 2024 14:10:41 +0900 Subject: [PATCH] test - update path --- apps/web/app/composables/useLocaleCurrent.ts | 2 +- apps/web/app/public/_redirects | 1 - apps/web/package.json | 2 +- apps/web/scripts/postbuild.sh | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 apps/web/app/public/_redirects diff --git a/apps/web/app/composables/useLocaleCurrent.ts b/apps/web/app/composables/useLocaleCurrent.ts index 0ef30c94..b25c1472 100644 --- a/apps/web/app/composables/useLocaleCurrent.ts +++ b/apps/web/app/composables/useLocaleCurrent.ts @@ -2,6 +2,6 @@ import { useI18n } from '#imports' export function useLocaleCurrent() { const { locale } = useI18n({ useScope: 'global' }) - const path = locale.value === 'ja' ? '' : `/${locale.value}` + const path = locale.value === 'ja' ? '/2024' : `/2024/${locale.value}` return { locale, path } } diff --git a/apps/web/app/public/_redirects b/apps/web/app/public/_redirects deleted file mode 100644 index 00692f06..00000000 --- a/apps/web/app/public/_redirects +++ /dev/null @@ -1 +0,0 @@ -/* /.netlify/functions/server 200 \ No newline at end of file diff --git a/apps/web/package.json b/apps/web/package.json index b1da1598..a82b0dc9 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "nuxt dev", - "build": "nuxt build && ./scripts/postbuild.sh && cp ./app/public/_redirects dist/2024/_redirects", + "build": "nuxt build && ./scripts/postbuild.sh", "preview": "nuxt preview", "lint": "bun run eslint && bun run htmllint", "lint-fix": "bun run eslint-fix && bun run htmllint-fix", diff --git a/apps/web/scripts/postbuild.sh b/apps/web/scripts/postbuild.sh index 76223827..6ef9f9d3 100755 --- a/apps/web/scripts/postbuild.sh +++ b/apps/web/scripts/postbuild.sh @@ -4,13 +4,13 @@ # change dir structure # ./dist/{html} -> ./dist/2024/{html} # -if [ ! -d "./dist" ]; then +if [ ! -d "./.nuxt/dist" ]; then echo "can not find dist" exit 1; fi mkdir ./tmp -mv ./dist/* ./tmp +mv ./.nuxt/dist/* ./tmp mkdir ./dist/2024 mv ./tmp/* ./dist/2024 rm -rf ./tmp \ No newline at end of file