Drop Custom Elements ES5 adapter (#6107)

This commit is contained in:
Paulus Schoutsen 2020-06-05 02:04:19 -07:00 committed by GitHub
parent f819e2cf8d
commit 67ac3b4ba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 5 additions and 14 deletions

View File

@ -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/")

View File

@ -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 %>");

View File

@ -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 %>");

View File

@ -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 %>");

View File

@ -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 = `

View File

@ -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 %>");

View File

@ -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() {

View File

@ -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 %>");