Skip to content

Commit

Permalink
Always run postprocess when required (except server)
Browse files Browse the repository at this point in the history
Previously we would only run postprocess in production. This means PR/Branch deploy etc... would not purge. I can't find any use case when someone would not want to purge.

If so, they should manually register their transformations (rather than rely on tailwind defaults)
  • Loading branch information
regisphilibert committed Jan 6, 2022
1 parent 443104a commit cd29a3a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions core/styles/private/GetTransformations.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@
*/}}
{{ $transformations := slice "toCSS" }}

{{ $IsProduction := partialCached "huge/env/IsProduction" "IsProduction" }}

{{ $NotServer := not site.IsServer }}

{{ with .use }}
{{ if in . "tailwind" }}
{{ $transformations = $transformations | append (slice "tailwind" "PostCSS") }}
Expand All @@ -58,13 +57,11 @@
{{ $transformations = $transformations | append "fingerprint" }}
{{ end }}


{{ with .use }}
{{ if or (in . "tailwind") (in . "postprocess") }}
{{ if and $NotServer $IsProduction }}
{{ $transformations = $transformations | append "PostProcess" }}
{{ if $NotServer }}
{{ with .use }}
{{ if or (in . "tailwind") (in . "postprocess") }}
{{ $transformations = $transformations | append "PostProcess" }}
{{ end }}
{{ end }}
{{ end }}

{{ return $transformations }}

0 comments on commit cd29a3a

Please sign in to comment.