GearoidCollins / dvla-uk-vehicle-lookup

GNU General Public License v2.0
1 stars 0 forks source link

Issue when using in browser (webpack build) #3

Open Truemedia opened 6 years ago

Truemedia commented 6 years ago

Hi there, Just found this library and managed to get it working in node easy enough using a promise.

The problem is I need to use it in the browser. When I try to use it in the browser I get this error: Failed to resolve async component: function () { Reason: ReferenceError: global is not defined

Not sure if this was intended for browsers or if you have any idea a work around for this, I'm a bit confused looking at the source code exactly what line is causing it to error.

GearoidCollins commented 6 years ago

Hi @Truemedia, Thanks for raising this, I just had a quick look and it seems cheerio might be the cause.

If possible can you provide some boilerplate code(include your babel config also) so I can debug your issue? thanks

Truemedia commented 6 years ago

Hi, It's when using either VuePress (babel config in root) https://github.com/vuejs/vuepress or a basic webpack config for es6 imports.