-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix issue with fast-deep-equal
when used with Vite
#18
Conversation
When running this library from Vite, because it is ESM-only it will throw when trying to call `equal` from the `fast-deep-equal` library. I believe this has to do with how it is imported, so we change the `import * as equal from...` to `import equal from...` and allow `esModuleInterop` in the `.tsconfig` The output of this now works in a vite environment, and solves issue: gilbarbara/react-joyride#769
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 659de4c:
|
I'm not entirely sure of the implications of importing the way I did, or of enabling |
@valtism In my experience turning on |
@gilbarbara Ah, I wasn't aware of that and that does sound pretty undesirable. I guess that means that this issue is blocked by epoberezkin/fast-deep-equal#105 |
Is there any way around this without |
Also need a walk around |
@JimmyRowland Here's a workaround: gilbarbara/react-joyride#769 (comment) |
@valtism Thanks. The walk around seems to work. I am using react-floater and after fixing fast-deep-equal/deepmerge import, react-floater still doesn't show custom body component. I will have to give up |
Fixed in 0.9.0 |
When running this library from Vite, because it is ESM-only it will throw when trying to call
equal
from thefast-deep-equal
library.I believe this has to do with how it is imported, so we change the
import * as equal from...
toimport equal from...
and allowesModuleInterop
in the.tsconfig
The output of this now works in a vite environment, and solves issue:
gilbarbara/react-joyride#769