PostCSS error with `{} not supported in Resource transformations`

Hi there, I’m simply trying to pass my CSS through postCSS autoprefixer by following way:

{{ $style := resources.Get "/css/style.css" | resources.PostCSS (dict "use" "autoprefixer" "noMap" false) }}

But I’m getting following error – just last line of error:

Rebuild failed:
… <resources.PostCSS>: error calling PostCSS: type map[string]interface {} not supported in Resource transformations

Is I’m doing something wrong here? I tried removing "noMap" true or to "noMap" false but same error.

Technical info Hugo Static Site Generator v0.63.1/extended linux/amd64 BuildDate: unknown

So, the line you posted looks correct … are you sure that is the exact line the error points to?

Yes it’s correct as I just copied and pasted it here

OK, I just got confused by the same error message, see

The thing is resources.Get "/css/style.css" in your case returns nil (not found).

Also keep in mind that in my case I’m using static directory.
My theme directory structure looks like

archetypes
layouts/
       _defaults
       partials
       shortcodes
static

That does not work, put it inside assets.

1 Like

Oh that’s the problem. TY!