fix: use modern build of storybook to fix unresolved promises and other issues caused by polyfills [6.0] #174
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #167 #169 #55
should also fix #20 #160 #159
What I did
Updated dependencies and metro config. The latest storybook alpha includes a modern build without polyfills that we can make use of by using the resolverMainfields option in metro config.
resolverMainFields: ['sbmodern', 'main']
With this change all issues with polyfills from storybook/addons and client should be resolved.
Going forward we need to replace knobs with controls because knobs don't support this and will break.
How to test
In the example app I added a button under the button promise->finally story. If you press the "Do a promise" button and the app doesn't error then the problem is fixed.