Skip to content

Commit 72f9af9

Browse files
authored
docs(upgrading/v6): add linux example in Update imports section (#12420)
1 parent 0adfd60 commit 72f9af9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@
242242
- saul-atomrigs
243243
- sbolel
244244
- scarf005
245+
- sealer3
245246
- senseibarni
246247
- sergiodxa
247248
- sgalhs

docs/upgrading/v6.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,12 @@ Instead of manually updating imports, you can use this command. Make sure your g
329329
find ./path/to/src \( -name "*.tsx" -o -name "*.ts" -o -name "*.js" -o -name "*.jsx" \) -type f -exec sed -i '' 's|from "react-router-dom"|from "react-router"|g' {} +
330330
```
331331

332+
If you have GNU `sed` installed (most Linux distributions), use this command instead:
333+
334+
```shellscript nonumber
335+
find ./path/to/src \( -name "*.tsx" -o -name "*.ts" -o -name "*.js" -o -name "*.jsx" \) -type f -exec sed -i 's|from "react-router-dom"|from "react-router"|g' {} +
336+
```
337+
332338
👉 **Update DOM-specific imports**
333339

334340
`RouterProvider` and `HydratedRouter` come from a deep import because they depend on `"react-dom"`:

0 commit comments

Comments
 (0)