You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-27Lines changed: 0 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -175,33 +175,6 @@ To extract all files in a single directory, give an object:
175
175
Note that `relativeRoot` is used to resolve relative directory names, available
176
176
as `[path]` in `filename` pattern.
177
177
178
-
## Using a `babel-register`
179
-
180
-
Make sure you set `ignore` option of `babel-register` to ignore all files used by css-modules-require-hook to process your css files.
181
-
182
-
**Require `babel-register` only once otherwise it will fail**
183
-
**Be aware, you need to explicitly ignore `node_modules` if you set `ignore` option**
184
-
185
-
```js
186
-
require('babel-register')({
187
-
ignore:/(processCss\.js|node_modules)/// regex matching all files used by css-modules-require-hook to process your css files
188
-
})
189
-
```
190
-
191
-
## Using in mocha
192
-
193
-
Create a js file with content
194
-
195
-
**Be aware, you need to explicitly ignore `node_modules` if you set `ignore` option**
196
-
197
-
```js
198
-
require('babel-register')({
199
-
ignore:/(processCss\.js|node_modules)/// regex matching all files used by css-modules-require-hook to process your css files
200
-
})
201
-
```
202
-
203
-
and then set this file as a compiler `--compilers js:<name-of-your-file>.js`
204
-
205
178
## Alternatives
206
179
207
180
-[babel-plugin-transform-postcss](https://github.com/wbyoung/babel-plugin-transform-postcss) - which supports async plugins and does not depend on `css-modules-require-hook`.
0 commit comments