Closed wsi18n closed 3 months ago
Imported variables already works, it seems like you have an outdated version from what I tested locally.
That being said, you can't use the router instance because it creates a cyclic import. If you need the router, pass it as an argument:
definePage({
meta: {
title: (router) => `project: ${router.currentRoute?.query.code})`,
},
props: route => route.query,
})
current
in xxxx.vue
but parsed to xxxx.vue?definePage&vue like this:
throw error
Uncaught (in promise) ReferenceError: router is not defined
expect
plan A:parsed to xxxx.vue?definePage&vue with useful import by AST analysis plan B:
<route />
support lang="ts":