Skip to content

Commit

Permalink
⚡ Perf: disable PWA in the built-in development server
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Jul 28, 2024
1 parent 72a77c2 commit 4065ce6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
{{- end -}}

{{- /* PWA */ -}}
{{- if .Site.Params.enablePWA | and hugo.IsProduction -}}
{{- if not hugo.IsServer | and .Site.Params.enablePWA | and hugo.IsProduction -}}
{{- $options := dict "targetPath" "service-worker.min.js" "minify" true -}}
{{- $source := resources.Get "js/service-worker.js" | js.Build $options -}}
{{- $_ := $source.RelPermalink -}}
Expand Down

0 comments on commit 4065ce6

Please sign in to comment.