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
This commit is contained in:
Joe Mooring
2021-10-08 22:34:08 -07:00
committed by Bjørn Erik Pedersen
parent f8d132d731
commit 64abc83fc4
2 changed files with 9 additions and 5 deletions

View File

@@ -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)