Closed tj closed 8 years ago
@tj If webpack's postcss-loader
is compiling each file separately then we can't see those variables. Can you import the files that contain the variables? https://github.com/postcss/postcss-loader#integration-with-postcss-import
Are other plugins sharing state between subsequent runs?
In my typical setup, I run postcss-import
first so that everything is available, then all the other plugins including postcss-css-variables
. But I haven't worked with a individually module'd build to hit this before.
hmm I'll check that out, webpack is pretty damn confusing haha, sounds like it's not an issue here though thanks for the pointer!
@tj did you figure out how to make it work?
Specifically I'm using rucksack and postcss-loader in Webpack.
:root
vars in the same file seem to work fine but otherwise the references just output undefined, any suggestions? They work fine if I assign them in JS. thanks!