foxbenjaminfox/vue-async-computed

Error when including vue-async-computed from CDN

Alex-Sokolov opened this issue · 2 comments

With 3.3.1 (no errors): http://jsfiddle.net/gnxvyqac/1/
With 3.4.0 (errors): http://jsfiddle.net/gnxvyqac/2/

Uncaught TypeError: Cannot set property 'AsyncComputed' of undefined

Yes, that's quite bad. It's fixed now in v3.4.1.

v3.4.0 included a change in the build step from babel-preset-2015 to babel-preset-env, which messed this up by adding a "use strict";, and then optimizing rollups use of this in the global scope into undefined.

I've fixed this by passing the appropriate { "modules": false } option to babel-preset-env, which gets it to behave the way you'd expect in this case.

Thanks for pointing this issue out!

Thanks!