The CorpusQuery and CorpusText components still use the options API. This breaks in production when using const { $api } = useNuxtApp();useNuxtApp() only works in <script setup lang="ts"> context.
Listening http://[::]:3000
[Vue Router warn]: uncaught error during route navigation:
Error: nuxt instance unavailable
at useNuxtApp (file:///Users/simar/vicav-vue3/.output/server/chunks/app/server.mjs:160:13)
The CorpusQuery and CorpusText components still use the options API. This breaks in production when using
const { $api } = useNuxtApp();
useNuxtApp()
only works in<script setup lang="ts">
context.We also want to use the composition API as much as possible and the code looks much simpler when using it. Please refer to https://vuejs.org/api/sfc-script-setup.html