feat(compatibility): add polyfill.io to improve compatibility (#236)

This commit is contained in:
Dillon 2020-04-17 00:25:42 +08:00 committed by GitHub
parent bc97c099ac
commit 9f37d7bc2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -6,3 +6,7 @@ algoliasearch:
- Promise
- Object.entries
- Object.assign
theme:
- Object.values
- Promise
- fetch

View file

@ -255,6 +255,9 @@
window.config = {{ jsonify $config | safeJS }};
</script>
{{- /* Polyfill.io */ -}}
{{- partial "plugin/script.html" (dict "source" "https://polyfill.io/v3/polyfill.min.js?features=Element.prototype.closest%2CrequestAnimationFrame%2CCustomEvent%2CPromise%2CObject.entries%2CObject.assign%2CObject.values%2Cfetch") -}}
{{- range $scratch.Get "script" -}}
{{- partial "plugin/script.html" . -}}
{{- end -}}