Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this has been rewritten to undefined #36

Open
vladshcherbin opened this issue Mar 4, 2022 · 2 comments
Open

this has been rewritten to undefined #36

vladshcherbin opened this issue Mar 4, 2022 · 2 comments

Comments

@vladshcherbin
Copy link

When using rollup, a warning is shown:

image

It leads to https://rollupjs.org/guide/en/#error-this-is-undefined

Is there a way to prevent this error?

No other packages in project produce errors or warnings.

@supnate
Copy link
Collaborator

supnate commented Mar 5, 2022

Suggest preventing the error from rollup config side: https://stackoverflow.com/questions/43556940/rollup-js-and-this-keyword-is-equivalent-to-undefined .
Since nice modal uses tsc command to compile the code, suppose it generates some kind of "standard" code.

@vladshcherbin
Copy link
Author

I saw this solution and would love to use it only if no other choice.

Two places use this in compiled code - __assign and __rest at the top.
I believe this are polyfills to quite popular functions.

Wondering what other libraries do since I haven't seen this warning with other packages and I do think they use this functions 🕵️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants