--minify breaks on JSON since 59.0

Since 59.0 hugo throws errors when trying to minify JSON files.

Building sites … ERROR 2019/11/01 16:57:44 parse error:1:1: unexpected character
    1: {"output":{"data":{"created":"2010-02-11T12:46:02Z","draf...
       ^
ERROR 2019/11/01 16:57:44 parse error:1:1: unexpected character
    1: {"output":{"data":{"created":"2010-03-08T16:25:25Z","draf...
       ^

It appears the minify lib has been updated to v2.5.2 with Hugo 59.0 so wondered if that could trigger the issue… https://github.com/gohugoio/hugo/commit/b401858ebd346c433dd69a260eba7098bded5a30

I’ll try and share a repo later.

Thanks!

For obvious bugs, it’s better to create a GH issue directly.

1 Like

Here you go: https://github.com/gohugoio/hugo/issues/6472

Not sure when I’ll be able to share a repo though.