Skip to content

Commit 58abcf5

Browse files
Zaggenljharb
authored andcommitted
Add instructions on how to use alias and root options
1 parent 5b3e8ea commit 58abcf5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,28 @@ npm install --save-dev babel-plugin-inline-react-svg
6666
]
6767
]
6868
}
69+
```
70+
- *`alias`* - An object with alias for module resolution
71+
- *`root`* - A relative path string (Starting from CWD), it only works in conjunction with alias.
72+
Example:
6973

74+
```json
75+
{
76+
"plugins": [
77+
[
78+
"inline-react-svg", {
79+
"root": "./",
80+
"alias": {
81+
"svgs": "svgs"
82+
}
83+
}
84+
]
85+
]
86+
}
7087
```
7188

89+
**Note:** If root is not specified it will always start resolving from the project root
90+
7291
### Via CLI
7392

7493
```sh

0 commit comments

Comments
 (0)