mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-07 17:36:35 +00:00
Fix hass.io panel (#1148)
This commit is contained in:
parent
3da55c6ab5
commit
eeba117e4b
@ -1,6 +1,7 @@
|
||||
const del = require('del');
|
||||
const gulp = require('gulp');
|
||||
const rename = require('gulp-rename');
|
||||
const replace = require('gulp-batch-replace');
|
||||
const gzip = require('gulp-gzip');
|
||||
const path = require('path');
|
||||
const runSequence = require('run-sequence');
|
||||
@ -20,6 +21,8 @@ const DEPS_TO_STRIP = [
|
||||
'bower_components/paper-styles/color.html',
|
||||
];
|
||||
|
||||
const es5Extra = "<script src='/frontend_es5/custom-elements-es5-adapter.js'></script>";
|
||||
|
||||
async function buildHassioPanel() {
|
||||
const stream = await bundledStreamFromHTML('hassio/hassio-app.html', {
|
||||
strategy: stripImportsStrategy(DEPS_TO_STRIP)
|
||||
@ -32,6 +35,7 @@ async function buildHassioPanel() {
|
||||
|
||||
function copyHassioIndex() {
|
||||
return gulp.src('hassio/index.html')
|
||||
.pipe(replace([['<!--EXTRA_SCRIPTS-->', es5Extra]]))
|
||||
.pipe(gulp.dest(OUTPUT_DIR));
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<!--EXTRA_SCRIPTS-->
|
||||
</head>
|
||||
<body>
|
||||
<hassio-app></hassio-app>
|
||||
@ -20,9 +21,6 @@
|
||||
e.src = src;
|
||||
document.head.appendChild(e);
|
||||
}
|
||||
if (!window.parent.HASS_DEV) {
|
||||
addScript('/frontend_es5/custom-elements-es5-adapter.js');
|
||||
}
|
||||
var webComponentsSupported = (
|
||||
'customElements' in window &&
|
||||
'import' in document.createElement('link') &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user