Closed ryantallmadge closed 8 years ago
Yeah this is because nothing is actually required and compiled when babel does its transformation magic. However, what you trying to do can be achieved with the context option. See also the section "Expressions in Style Rules" in the README.
If you have any further question, feel free to ask.
Im getting and error:
AssertionError: /PATH/TO/PAGE : invalid value expression type while parsing file /PATH/TO/SAME/PAGE
I have a simple CSS:
main.js
var colors = require('../styles/colors'); var pageCss = cssInJS({ 'default' : { 'backgroundColor' : colors.greys._1 } });
colors.js
var colors = { 'greys' : { _1 : '#F2F5F8' } }; module.exports = colors;