mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 18:36:35 +00:00
Use dynamic import for cast/demo to show latest build (#6202)
This commit is contained in:
parent
d0ba5696d1
commit
454ddf366a
@ -37,14 +37,13 @@
|
|||||||
<body>
|
<body>
|
||||||
<%= renderTemplate('_js_base') %>
|
<%= renderTemplate('_js_base') %>
|
||||||
|
|
||||||
<script type="module" crossorigin="use-credentials">
|
<script>
|
||||||
import "<%= latestLauncherJS %>";
|
import("<%= latestLauncherJS %>");
|
||||||
|
window.latestJS = true;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script nomodule>
|
<script>
|
||||||
(function() {
|
if (!window.latestJS) {
|
||||||
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
|
||||||
if (!isS101) {
|
|
||||||
<% if (useRollup) { %>
|
<% if (useRollup) { %>
|
||||||
_ls("/static/js/s.min.js").onload = function() {
|
_ls("/static/js/s.min.js").onload = function() {
|
||||||
System.import("<%= es5LauncherJS %>");
|
System.import("<%= es5LauncherJS %>");
|
||||||
@ -53,7 +52,6 @@
|
|||||||
_ls("<%= es5LauncherJS %>");
|
_ls("<%= es5LauncherJS %>");
|
||||||
<% } %>
|
<% } %>
|
||||||
}
|
}
|
||||||
})();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<hc-layout subtitle="FAQ">
|
<hc-layout subtitle="FAQ">
|
||||||
|
@ -28,14 +28,13 @@
|
|||||||
|
|
||||||
<hc-connect></hc-connect>
|
<hc-connect></hc-connect>
|
||||||
|
|
||||||
<script type="module" crossorigin="use-credentials">
|
<script>
|
||||||
import "<%= latestLauncherJS %>";
|
import("<%= latestLauncherJS %>");
|
||||||
|
window.latestJS = true;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script nomodule>
|
<script>
|
||||||
(function() {
|
if (!window.latestJS) {
|
||||||
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
|
||||||
if (!isS101) {
|
|
||||||
<% if (useRollup) { %>
|
<% if (useRollup) { %>
|
||||||
_ls("/static/js/s.min.js").onload = function() {
|
_ls("/static/js/s.min.js").onload = function() {
|
||||||
System.import("<%= es5LauncherJS %>");
|
System.import("<%= es5LauncherJS %>");
|
||||||
@ -44,7 +43,6 @@
|
|||||||
_ls("<%= es5LauncherJS %>");
|
_ls("<%= es5LauncherJS %>");
|
||||||
<% } %>
|
<% } %>
|
||||||
}
|
}
|
||||||
})();
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
@ -86,12 +86,13 @@
|
|||||||
<%= renderTemplate('_js_base') %>
|
<%= renderTemplate('_js_base') %>
|
||||||
<%= renderTemplate('_preload_roboto') %>
|
<%= renderTemplate('_preload_roboto') %>
|
||||||
|
|
||||||
<script type="module" src="<%= latestDemoJS %>"></script>
|
<script>
|
||||||
|
import("<%= latestDemoJS %>");
|
||||||
|
window.latestJS = true;
|
||||||
|
</script>
|
||||||
|
|
||||||
<script nomodule>
|
<script>
|
||||||
(function() {
|
if (!window.latestJS) {
|
||||||
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
|
||||||
if (!isS101) {
|
|
||||||
<% if (useRollup) { %>
|
<% if (useRollup) { %>
|
||||||
_ls("/static/js/s.min.js").onload = function() {
|
_ls("/static/js/s.min.js").onload = function() {
|
||||||
System.import("<%= es5DemoJS %>");
|
System.import("<%= es5DemoJS %>");
|
||||||
@ -100,7 +101,6 @@
|
|||||||
_ls("<%= es5DemoJS %>");
|
_ls("<%= es5DemoJS %>");
|
||||||
<% } %>
|
<% } %>
|
||||||
}
|
}
|
||||||
})();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
<%= renderTemplate('_js_base') %>
|
<%= renderTemplate('_js_base') %>
|
||||||
<%= renderTemplate('_preload_roboto') %>
|
<%= renderTemplate('_preload_roboto') %>
|
||||||
|
|
||||||
<script>
|
<script crossorigin="use-credentials">
|
||||||
import("<%= latestCoreJS %>");
|
import("<%= latestCoreJS %>");
|
||||||
import("<%= latestAppJS %>");
|
import("<%= latestAppJS %>");
|
||||||
window.customPanelJS = "<%= latestCustomPanelJS %>";
|
window.customPanelJS = "<%= latestCustomPanelJS %>";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user