mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-01 13:37:47 +00:00
Switch onboarding and auth to dynamic import
This commit is contained in:
parent
993d73c359
commit
3717e94814
@ -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 %>");
|
||||
|
@ -52,17 +52,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.stepsPromise = fetch("/api/onboarding", {
|
||||
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 %>");
|
||||
|
Loading…
x
Reference in New Issue
Block a user