vue-async-function icon indicating copy to clipboard operation
vue-async-function copied to clipboard

Problems with using in Nuxtjs

Open sbglasius opened this issue 5 years ago • 2 comments

The ideas in this library is great, but I have spent more than a day trying to get it running in a Nuxt application (nuxtjs.org)

My sample application where it fails is here: https://github.com/sbglasius/nuxt-composition-async-function

Steps performed:

Create a Nuxt application,

npx create-nuxt-app 

add Typescript support: https://typescript.nuxtjs.org/guide/setup.html#installation

add composition support + vue-async-function:

npm install --save @vue/composition-api vue-async-function

and create a plugin in plugins/composition.ts, adding it to nuxt.config.js

Then following the typescript examples, adding code to pages/index.vue

Unfortunately I'm too much of a noob in the VueJS/NuxtJS world to see my way through what is wrong. I hope you can help. Thank you in advance.

sbglasius avatar Nov 19 '19 11:11 sbglasius

I've not used Nuxt before so I'm not sure if I can help. I can give it a try, but I'm a bit limited on time currently.

AlbertBrand avatar Nov 19 '19 20:11 AlbertBrand

Allright, tried to follow above steps and saw that Nuxt is still on core-js 2.x while I just upgraded vue-async-function to core-js 3.x. Also, @vue/composition-api doesn't support SSR yet so it breaks universal mode.

So, to fix this you need to change two things:

I'll keep this issue open until I hear from you.

AlbertBrand avatar Nov 20 '19 19:11 AlbertBrand