I'm getting an issue with this code:
Import styles from '.treeView.css'
React.createClass({
render(
<div styleName={styles.treeNode>some text </div>
);
});
})
My css is :
.treeNode { color:red }
This runs fine when running webpack with the css-loader. However I can no longer run my tests that import the above component as it complains about "unexpected token" starting on line 1 of the css file.
My npm test line in package.json is
mocha './src/**/*.tests.js' --compilers js:babel-core/register
I'm not certain whether this is an issue with my babel setup not being able to parse the css file.
Any help is appreciated.