acdh-oeaw / vicav-vue3

Reimplementation of the VICAV Frontend based on Vue.js 3
https://vicav-vue.acdh-ch-dev.oeaw.ac.at
MIT License
0 stars 0 forks source link

Corpus components must use the new Compoisition API Syntax #34

Closed simar0at closed 10 months ago

simar0at commented 1 year ago

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)

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

simar0at commented 1 year ago

Steps to reproduce:

npm run build
npm run start
# new terminal
curl localhost:3000
ttechnicus commented 10 months ago

@simar0at This tasks seems very obsolete. We could close it by now.