refactor(frontend): migrate from Vite to Nuxt SPA
Replace Vite and Vue Router with Nuxt framework Update Docker, build scripts, and env vars for Nuxt generate
This commit is contained in:
14
frontend/plugins/02-seo.client.ts
Normal file
14
frontend/plugins/02-seo.client.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { onLocaleChange } from '../src/i18n';
|
||||
import { applyRouteSeo } from '../src/seo';
|
||||
|
||||
export default defineNuxtPlugin(() => {
|
||||
const router = useRouter();
|
||||
|
||||
router.afterEach((to) => {
|
||||
applyRouteSeo(to);
|
||||
});
|
||||
|
||||
onLocaleChange(() => {
|
||||
applyRouteSeo(router.currentRoute.value);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user