Mocha compiler for es6 + react components with css require statements · GitHub

  • function noop () { return null ; } require .
  • Mocha compiler for es6 + react components with css require statements
  • extensions [ ‘ .css ‘ ] = noop; require .
  • Instead of embedding the babel compiler you could do something like this
  • // Allow the stage to be configured by an environment

Read the full article, click here.


@fisherstwitt: “Using #mochajs with #ES6 #reactjs components and #css import statements ending up with “Unexpected token”? Check:”


@xseignard this is a great solution! I changed your answer from css to less to suit my purposes and interestingly, I kept getting Invariant Violation errors until I switched the order of the compilers and listed jsx first. Any idea why that would be?


Mocha compiler for es6 + react components with css require statements · GitHub