File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -179,20 +179,23 @@ as `[path]` in `filename` pattern.
179
179
Make sure you set ` ignore ` option of ` babel-register ` to ignore all files used by css-modules-require-hook to process your css files.
180
180
181
181
** Require ` babel-register ` only once otherwise it will fail**
182
+ ** Be aware, you need to explicitly ignore ` node_modules ` if you set ` ignore ` option**
182
183
183
184
``` js
184
185
require (' babel-register' )({
185
- ignore: / processCss\. js$ / // regex matching all files used by css-modules-require-hook to process your css files
186
+ ignore: / ( processCss\. js| node_modules) / // regex matching all files used by css-modules-require-hook to process your css files
186
187
})
187
188
```
188
189
189
190
## Using in mocha
190
191
191
192
Create a js file with content
192
193
194
+ ** Be aware, you need to explicitly ignore ` node_modules ` if you set ` ignore ` option**
195
+
193
196
``` js
194
197
require (' babel-register' )({
195
- ignore: / processCss\. js$ / // regex matching all files used by css-modules-require-hook to process your css files
198
+ ignore: / ( processCss\. js| node_modules) / // regex matching all files used by css-modules-require-hook to process your css files
196
199
})
197
200
```
198
201
You can’t perform that action at this time.
0 commit comments