Skip to content

Commit 1c93c19

Browse files
update readme for babel-register hook
1 parent abd6235 commit 1c93c19

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,18 @@ and then add any relevant extensions to your plugin config:
116116
117117
```
118118

119+
## Using a `babel-register`
120+
121+
Make sure you set `ignore` option of `babel-register` to ignore all files used by css-modules-require-hook to process your css files.
122+
123+
**Require `babel-register` only once otherwise it will fail**
124+
125+
```js
126+
require('babel-register')({
127+
ignore: /processCss\.js$/ // regex matching all files used by css-modules-require-hook to process your css files
128+
})
129+
```
130+
119131
## License
120132

121133
MIT

0 commit comments

Comments
 (0)