1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-19 08:20:41 +01:00

Fix es5 build (#7319)

This commit is contained in:
Bram Kragten
2020-10-14 22:20:39 +02:00
committed by GitHub
parent 6165cb0f83
commit f6ff652ca4
12 changed files with 107 additions and 31 deletions

View File

@@ -44,17 +44,17 @@
<%= renderTemplate('_js_base') %>
<%= renderTemplate('_preload_roboto') %>
<script type="module" crossorigin="use-credentials">
import "<%= latestPageJS %>";
<script crossorigin="use-credentials">
import("<%= latestPageJS %>");
window.latestJS = true;
window.providersPromise = fetch("/auth/providers", {
credentials: "same-origin",
});
</script>
<script nomodule>
<script>
(function() {
// Safari 10.1 supports type=module but ignores nomodule, so we add this check.
if (!isS101) {
if (!window.latestJS) {
<% if (useRollup) { %>
_ls("/static/js/s.min.js").onload = function() {
System.import("<%= es5PageJS %>");
@@ -66,4 +66,4 @@
})();
</script>
</body>
</html>
</html>