theKashey/use-sidecar

__assign is not a function

Closed this issue · 2 comments

Hi, I'm using version 1.0.1 and I've found a rare issue embedding the script into a site, the error is:

TypeError: __assign is not a function at createSidecarMedium
Screen Shot 2023-01-11 at 12 38 52

the build is made with esbuild with target es2020

it seems that the assign function does not exist., and it is supposed that the assign is a function that is loaded from.

any idea what could be causing this?

That is tslib_1.__assign (the end of https://unpkg.com/browse/use-sidecar@1.0.1/dist/es5/medium.js) and dependency on tslib is explicitly set.
So 🤷‍♂️, it should work

Was a problem with requirejs on a page that overrides define() function.
it has nothing to do with this library. Thanks for the quick reply Anton.