foxbenjaminfox/vue-async-computed

Feature Request: compatibility with vue serve

Closed this issue · 3 comments

If using the vue cli (v3) and vue serve to develop a single file component, then one can not test your plugin.

Otherwise looks promising

Could you provide more details about what's not working? I created a new Vue app with vue create app-name, then ran npm install vue-async-computed, then added these lines to src/main.js:

import VueAsyncComputed from 'vue-async-computed'

Vue.use(VueAsyncComputed)

And in src/App.vue I added to the component an async computed property:

  asyncComputed: {
    testing () {
      return Promise.resolve('hello world')
    }
  }

And to the template I added {{testing}}. I then ran npm run serve, and I see the string "hello world" as part of the component, as I'd expect.

In this minimal test case, everything worked as expected. Perhaps your issue only comes up in a more complicated scenario? Or perhaps you missed one of those steps in setting it up?

If you can give me details of how to reproduce this issue, I'll look into it further.

I don't know what @SumNeuron's problem is, but I just observed that when I added (Vue.use, in main.js) vue-async-computed, then hot reload partially stopped working. I think this is new.

It works in all files except the one component that uses asyncComputed. I can even make a syntax error, and the server doesn't see it. My project is based on the webpack template.

I tried moving the Vue.use to before that particular component was imported, but no change.

I apologize. It seems to be when I import vue-markdown that things break. Too many changes at once.