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

Add react-native to the resolver array #325

Merged
merged 2 commits into from
Feb 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add react-native to the resolver array
  • Loading branch information
gabimoncha committed Feb 7, 2022
commit 443770de02fd70f2df8411a8d76f2df24b0d995a
2 changes: 1 addition & 1 deletion examples/native/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ module.exports = {
}),
},
resolver: {
resolverMainFields: ['sbmodern', 'browser', 'main'],
resolverMainFields: ['sbmodern', 'react-native', 'browser', 'main'],
},
};
4 changes: 2 additions & 2 deletions v6README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ expo install @storybook/react-native@next \

Datetime picker, slider and addon-controls are required for controls to work. If you don't want controls you don't need to install these (controls is the knobs replacement).

Continue by updating your metro config to have `resolver:{resolverMainFields: ['sbmodern', 'browser', 'main']}`.
Continue by updating your metro config to have `resolver:{resolverMainFields: ['sbmodern', 'react-native', 'browser', 'main']}`.
This enables us to use the modern build of storybook instead of the polyfilled versions.

**Vanilla React Native**
Expand All @@ -91,7 +91,7 @@ module.exports = {
}),
},
resolver: {
resolverMainFields: ['sbmodern', 'browser', 'main'],
resolverMainFields: ['sbmodern', 'react-native', 'browser', 'main'],
gabimoncha marked this conversation as resolved.
Show resolved Hide resolved
},
};" > metro.config.js
```
Expand Down