ignore-styles
A babel/register
style hook to ignore style imports when running in Node. This
is for projects that use something like Webpack to enable CSS imports in
JavaScript. When you try to run the project in Node (to test in Mocha, for
example) you'll see errors like this:
SyntaxError: /Users/brandon/code/my-project/src/components/my-component/style.sass: Unexpected token (1:0)
> 1 | .title
| ^
2 | font-family: serif
3 | font-size: 10em
4 |
To resolve this, use ignore-styles
as a compiler:
mocha --compilers css:ignore-styles
Enjoy!