mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Drop Custom Elements ES5 adapter (#6107)
This commit is contained in:
parent
f819e2cf8d
commit
67ac3b4ba3
@ -36,11 +36,13 @@ function copyMdiIcons(staticDir) {
|
|||||||
function copyPolyfills(staticDir) {
|
function copyPolyfills(staticDir) {
|
||||||
const staticPath = genStaticPath(staticDir);
|
const staticPath = genStaticPath(staticDir);
|
||||||
|
|
||||||
// Web Component polyfills and adapters
|
// For custom panels using ES5 builds that don't use Babel 7+
|
||||||
copyFileDir(
|
copyFileDir(
|
||||||
npmPath("@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"),
|
npmPath("@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"),
|
||||||
staticPath("polyfills/")
|
staticPath("polyfills/")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Web Component polyfills and adapters
|
||||||
copyFileDir(
|
copyFileDir(
|
||||||
npmPath("@webcomponents/webcomponentsjs/webcomponents-bundle.js"),
|
npmPath("@webcomponents/webcomponentsjs/webcomponents-bundle.js"),
|
||||||
staticPath("polyfills/")
|
staticPath("polyfills/")
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
(function() {
|
(function() {
|
||||||
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
||||||
if (!isS101) {
|
if (!isS101) {
|
||||||
_ls("/static/polyfills/custom-elements-es5-adapter.js");
|
|
||||||
<% 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 %>");
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
(function() {
|
(function() {
|
||||||
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
||||||
if (!isS101) {
|
if (!isS101) {
|
||||||
_ls("/static/polyfills/custom-elements-es5-adapter.js");
|
|
||||||
<% 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 %>");
|
||||||
|
@ -92,7 +92,6 @@
|
|||||||
(function() {
|
(function() {
|
||||||
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
||||||
if (!isS101) {
|
if (!isS101) {
|
||||||
_ls("/static/polyfills/custom-elements-es5-adapter.js");
|
|
||||||
<% 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 %>");
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
import "../../src/resources/compatibility";
|
import "../../src/resources/compatibility";
|
||||||
|
import "../../src/resources/roboto";
|
||||||
window.loadES5Adapter().then(() => {
|
import "./hassio-main";
|
||||||
// eslint-disable-next-line
|
|
||||||
import(/* webpackChunkName: "roboto" */ "../../src/resources/roboto");
|
|
||||||
// eslint-disable-next-line
|
|
||||||
import(/* webpackChunkName: "hassio-main" */ "./hassio-main");
|
|
||||||
});
|
|
||||||
|
|
||||||
const styleEl = document.createElement("style");
|
const styleEl = document.createElement("style");
|
||||||
styleEl.innerHTML = `
|
styleEl.innerHTML = `
|
||||||
|
@ -47,7 +47,6 @@
|
|||||||
(function() {
|
(function() {
|
||||||
// Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
// Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
||||||
if (!isS101) {
|
if (!isS101) {
|
||||||
_ls("/static/polyfills/custom-elements-es5-adapter.js");
|
|
||||||
<% if (useRollup) { %>
|
<% if (useRollup) { %>
|
||||||
_ls("/static/js/s.min.js").onload = function() {
|
_ls("/static/js/s.min.js").onload = function() {
|
||||||
System.import("<%= es5PageJS %>");
|
System.import("<%= es5PageJS %>");
|
||||||
|
@ -66,7 +66,6 @@
|
|||||||
(function() {
|
(function() {
|
||||||
if (!window.latestJS) {
|
if (!window.latestJS) {
|
||||||
window.customPanelJS = "<%= es5CustomPanelJS %>";
|
window.customPanelJS = "<%= es5CustomPanelJS %>";
|
||||||
_ls("/static/polyfills/custom-elements-es5-adapter.js");
|
|
||||||
|
|
||||||
<% if (useRollup) { %>
|
<% if (useRollup) { %>
|
||||||
_ls("/static/js/s.min.js").onload = function() {
|
_ls("/static/js/s.min.js").onload = function() {
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
(function() {
|
(function() {
|
||||||
// Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
// Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
||||||
if (!isS101) {
|
if (!isS101) {
|
||||||
_ls("/static/polyfills/custom-elements-es5-adapter.js");
|
|
||||||
<% if (useRollup) { %>
|
<% if (useRollup) { %>
|
||||||
_ls("/static/js/s.min.js").onload = function() {
|
_ls("/static/js/s.min.js").onload = function() {
|
||||||
System.import("<%= es5PageJS %>");
|
System.import("<%= es5PageJS %>");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user