Open antonstjernquist opened 8 months ago
That is interesting. In our tests it worked perfectly fine, but I will have a look at it. Do you happen to know if your version with saving it in a variable first is working?
That is interesting. In our tests it worked perfectly fine, but I will have a look at it. Do you happen to know if your version with saving it in a variable first is working?
Yepp! This seems to solve the issue for me 👍
Unsure if only happens when you bundle the output. I'm using Typescript and I believe the bundled version is "scoped", meaning I can only access the exports via the global scope.
Just "global.exports" solves it as well
Bundling might be the issue, depending on the used bundler. I will do some testing and maybe the little extra step of saving it in a variable can solve the issue for most bundlers.
Export for core objects fails.
Here:
this.framework = exports["qb-core"]["GetCoreObject"]();
I think you need to save exports in some variable first, something like: