Skip to content

Commit

Permalink
fix: added support for other module augmentation of definePageMeta #79
Browse files Browse the repository at this point in the history
  • Loading branch information
victorgarciaesgi committed Mar 8, 2023
1 parent fd624fb commit 7a0b26d
Show file tree
Hide file tree
Showing 5 changed files with 647 additions and 16 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"vitest": "^0.29.2",
"vue-eslint-parser": "^9.1.0",
"vue-router": "^4.1.6",
"vue-tsc": "^1.1.7"
"vue-tsc": "^1.1.7",
"nuxt-seo-kit": "1.3.4"
}
}
1 change: 1 addition & 0 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createResolver, defineNuxtModule, extendPages } from '@nuxt/kit';
import NuxtTypedRouter from '..';

export default defineNuxtConfig({
extends: ['nuxt-seo-kit'],
modules: [NuxtTypedRouter, '@nuxtjs/i18n', '@nuxt/devtools'],
nuxtTypedRouter: {
plugin: true,
Expand Down
8 changes: 4 additions & 4 deletions playground/src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
</template>

<script setup lang="ts">
import { definePageMeta, TypedRouteLocationRawFromName, helpers } from '@typed-router';
import { TypedRouteLocationRawFromName, helpers } from '@typed-router';
// definePageMeta({
// redirect: (route) => helpers.route({ name: 'admin-id', params: { id: 1 } }),
// });
// definePageMeta('index', {
// redirect: '/admin/foo/ar',
// });
definePageMeta({
title: 'foo',
});
const router = useRouter();
Expand Down
Loading

1 comment on commit 7a0b26d

@vercel
Copy link

@vercel vercel bot commented on 7a0b26d Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.