Closed erredeco closed 7 years ago
@erredeco I'm not really good at Grunt, so I am wondering: does Grunt variable is expected to be evaluated when it is not the part of the main configuration object? Because in your case it is not: the variable is set on a separate object which is passed to the plugin function.
My assumption that it is not getting evaluated at all because of that.
@borodean I've understood why it fails. Thank you... I'll try to find if there is a way to pass it to the plugin function. I am not expert, too.
@erredeco I think if my assumption on why it fails is right, it would be cool if grunt-postcss
supports passing plugins and their options separately (so options are a part of the main configuration object and variables would get substituted there).
cc @nDmitry
I have defined on my Gruntfile.js:
Using as configuration:
I obtain the error Fatal error:
Asset not found or unreadable: myimage.jpg
Using instead:
Everything works. I can't understand why.