-
-
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: remove reliance on top level await and external polyfill/helper #35
Conversation
…lyfills/helpers This PR reworks the serialization code to use JSON.stringify and JSON.parse instead of structured clone and a third-party serialization polyfill/helper. A new function to configure serialization has been added to provide developers with a way to plug back in the more advanced serialization approach if they want/need it for their app.
Beyond the rollup issue, were you having any specific issues with windows? I checked through the scripts and they are all node based for this project, so should be okay. |
Also having a think about the serializer, its reasonable to configure a serialiser. I've updated the code slightly so that a single object can be passed for it. Being able to use JSON by default will be a lot cleaner upfront. If someone needs a complex state serializer, they can with no concern now. |
I have released this as 1.0.1-alpha.206 |
Awesome! Thank you @fabiancook ! |
This PR reworks the serialization code to use
JSON.stringify
andJSON.parse
instead of structured clone and a third-party serialization polyfill/helper. A new function calledconfigureSerialization(...)
has been added to provide developers with a way to plug back in the more advanced serialization approach if they want/need it for their app.Checklist
yarn build
and the Code of conduct
Issues
Notes
A couple of critical things are left undone. I'm looking for some help/feedback on:
configureSerialization(...)
and I'll amend this PR with that (assuming you support the approach I took).