diff options
author | Joe Mooring <[email protected]> | 2021-10-08 22:34:08 -0700 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2021-10-10 11:11:43 +0200 |
commit | 64abc83fc4b70c70458c582ae2cf67fc9c67bb3f (patch) | |
tree | 42c2718ea24ce2f3e59d2b516ff1939d29ca193b /resources/resource_transformers | |
parent | f8d132d731cf8e27c8c17931597fd975e8a7c3cc (diff) | |
download | hugo-64abc83fc4b70c70458c582ae2cf67fc9c67bb3f.tar.gz hugo-64abc83fc4b70c70458c582ae2cf67fc9c67bb3f.zip |
Allow multiple plugins in the PostCSS options map
Usage:
{{ $options := dict "use" "autoprefixer postcss-color-alpha" }}
{{ $style := resources.Get "main.css" | resources.PostCSS $options }}
Fixes #9015
Diffstat (limited to 'resources/resource_transformers')
-rw-r--r-- | resources/resource_transformers/postcss/postcss.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/resources/resource_transformers/postcss/postcss.go b/resources/resource_transformers/postcss/postcss.go index 5fcadd937..8104d0336 100644 --- a/resources/resource_transformers/postcss/postcss.go +++ b/resources/resource_transformers/postcss/postcss.go @@ -113,7 +113,8 @@ func (opts Options) toArgs() []string { args = append(args, "--no-map") } if opts.Use != "" { - args = append(args, "--use", opts.Use) + args = append(args, "--use") + args = append(args, strings.Fields(opts.Use)...) } if opts.Parser != "" { args = append(args, "--parser", opts.Parser) |