-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Added support for the haul
react-native packager
#1294
Conversation
Nice one, thanks @ericwooley ! PR looks good, I'll test it out later today and let you know if I have questions. |
Codecov Report
@@ Coverage Diff @@
## master #1294 +/- ##
==========================================
- Coverage 13.76% 13.71% -0.06%
==========================================
Files 201 207 +6
Lines 4620 4646 +26
Branches 492 497 +5
==========================================
+ Hits 636 637 +1
- Misses 3570 3588 +18
- Partials 414 421 +7
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good to me, @shilman this sounds like a breakthrough in regards to the RN + npm linking problem?
app/react-native/readme.md
Outdated
|
||
[Haul](https://github.com/callstack-io/haul) is an alternative to the react-native packager and has several advantages in that it allows you to define your own loaders, and handles symlinks better. | ||
|
||
If you want to use haul instead of the react-native packager, modify they storybook npm script too: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: too to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And they the
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm so bad with spelling.
I need some kind of ai to just point this kinda stuff out. If only there were some kind of build in tools...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I know this pain, for one of my blogs we use danger-prose to lint for typos.
@ndelangen @tmeasday YES! haul does solve our RN simlink problem. tested it out for this PR, and also with lerna bootstrap. great news and thank you @ericwooley for introducing us to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericwooley this is super awesome. mind fixing those minor typos that @orta pointed out? then i'll merge.
Nevermind. Made the changes myself since I'm so eager to get this merged 😄 |
haul
react-native packager
@shilman @ndelangen I'm glad you like it! I was having lerna issues as well which motivated me to investigate! An interesting thing, after I started using my fork. Stories imported from Can anyone point me in the direction of where such code might be? I'll open another PR if I can pinpoint the issue. This actually maybe related to #1068 , will investigate more. |
great! Now maybe it's worth to add this to the contribution guide, and maybe create a "test-crna" example that automatically has the proper haul config already setup so that contributors can easily test their changes locally? |
That's the plan. I'm offline for the next four days but can pick it up when I get back. Or feel free to pick it up and run with it! |
Such good news! Do we need to add |
Doesn't Expo use the react-native packager regardless, though? How does the packaging process go in correlation to running Storybook and Expo w/ |
@tmeasday currently I don't think you would, but I am not certain. There may be some edge case (that I can't think of) where a user wants to use haul for their storybook, and the react-native packager for the actual app, but if thats they case I think they will have to live with adding haul as a dependency manually, instead of requiring everyone install the haul cli, just in case. @SEAPUNK I'm not super familiar with how expo does it. If they just run |
@tmeasday If there is an argument added to getStorybook, eg |
@ericwooley -- I'm not sure what's best, but perhaps we should add it as an |
@tmeasday @ericwooley good point about the dependency. i totally missed this in my review. i was too excited about fixing our development/testing environment. 😄 |
Issue: New Feature
What I did
I added another cli option to use the haul cli instead of the react-native packager.
How to test
create a react-native new app with a new install of storybook.
install haul from hauls app initializer.
cp webpack.haul.js webpack.haul.storybook.js
change the entry from
to
--haul webpack.haul.storybook.js
to your storybook commandHaul should take over and do the job of the react-native packager.