Skip to content

Commit 97cb452

Browse files
committed
docs: document installation requirements
1 parent b59358d commit 97cb452

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ In contrast to [`react-css-modules`](https://github.com/gajus/react-css-modules)
1818
* [Anonymous reference](#anonymous-reference)
1919
* [Named reference](#named-reference)
2020
* [Configuration](#configuration)
21+
* [Installation](#installation)
2122
* [Example transpilations](#example-transpilations)
2223
* [Anonymous `styleName` resolution](#anonymous-stylename-resolution)
2324
* [Named `styleName` resolution](#named-stylename-resolution)
@@ -87,6 +88,14 @@ NODE_ENV=production ./test
8788

8889
Missing a configuration? [Raise an issue](https://github.com/gajus/babel-plugin-react-css-modules/issues/new?title=New%20configuration:).
8990

91+
## Installation
92+
93+
When `babel-plugin-react-css-modules` cannot resolve CSS module at a compile time, it imports a helper function (read [Runtime `styleName` resolution](#runtime-stylename-resolution)). Therefore, you must install `babel-plugin-react-css-modules` as a direct dependency of the project.
94+
95+
```bash
96+
npm install babel-plugin-react-css-modules --save
97+
```
98+
9099
## Conventions
91100

92101
### Anonymous reference

0 commit comments

Comments
 (0)