You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+28-4Lines changed: 28 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,18 +79,20 @@ yalc add react-on-rails
79
79
The workflow is:
80
80
81
81
1. Make changes to the node package.
82
-
2.We need yalc to push and then run yarn:
82
+
2.**CRITICAL**: Run yalc push to send updates to all linked apps:
83
83
84
84
```
85
85
cd <top dir>
86
-
# Will send the updates to other folders
86
+
# Will send the updates to other folders - MUST DO THIS AFTER ANY CHANGES
87
87
yalc push
88
88
cd spec/dummy
89
89
90
90
# Will update from yalc
91
91
yarn
92
92
```
93
93
94
+
**⚠️ Common Mistake**: Forgetting to run `yalc push` after making changes to React on Rails source code will result in test apps not receiving updates, making it appear that your changes have no effect.
95
+
94
96
When you run `yalc push`, you'll get an informative message
# After running the install generator AND after making any changes to the React on Rails source code
392
394
cd /path/to/react_on_rails
393
395
npm run build
394
396
npx yalc publish
397
+
# CRITICAL: Push changes to all linked apps
398
+
npx yalc push
395
399
396
400
cd /path/to/test_app
397
-
npx yalc add react-on-rails
398
401
npm install
399
402
400
403
# Restart development server
401
404
bin/dev
402
405
```
403
406
407
+
**⚠️ CRITICAL DEBUGGING NOTE:**
408
+
Always run `yalc push` after making changes to React on Rails source code. Without this step, your test app won't receive the updated package, leading to confusing behavior where changes appear to have no effect.
409
+
410
+
**Alternative to Yalc: npm pack (More Reliable)**
411
+
For a more reliable alternative that exactly mimics real package installation:
0 commit comments