Marking a resource with resources.PostProcess delays any transformations to after the build, typically because one or more of the steps in the transformation chain depends on the result of the build (e.g. files in public).
The below configuration will write a hugo_stats.json file to the project root as part of the build. If you’re only using this for the production build, you should consider placing it below config/production.
Note that in the example above, the “CSS purge step” will only be applied to the production build. This means that you need to do something like this in your head template to build and include your CSS: