File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1414
1515{{ $defines
1616 := dict
17- "process.env.NODE_ENV" ` "development"`
17+ "process.env.NODE_ENV" ((cond .Site.Params.devMode "development" "production") | jsonify)
1818 "global" "window"
1919}}
2020{{ $commonJsBuildOptions
2626}}
2727
2828{{ $pdfWorkerBundle := resources.Get "js/Utility/pdf.worker.ts" | js.Build $commonJsBuildOptions }}
29- {{ $pdfWorkerDefines := dict "defines" (dict "window.PDF_WORKER_URL" ($pdfWorkerBundle.Permalink | jsonify)) }}
29+ <!-- We are using the `RelPermalink` here because otherwise we try to load the worker from the German domain even for
30+ the other languages, which causes cross-origin errors. I don't understand why. -->
31+ {{ $pdfWorkerDefines := dict "defines" (dict "window.PDF_WORKER_URL" ($pdfWorkerBundle.RelPermalink | jsonify)) }}
3032
3133<!-- Entry points that are included in every page. -->
3234{{ $errorHandlerBundle := resources.Get "js/error-handler.js" | js.Build (merge $commonJsBuildOptions $pdfWorkerDefines) }}
You can’t perform that action at this time.
0 commit comments