diff --git a/gulp/tasks/build.js b/gulp/tasks/build.js index 396a72fb3..cbd546755 100644 --- a/gulp/tasks/build.js +++ b/gulp/tasks/build.js @@ -36,7 +36,6 @@ function build(es6) { stripImportsStrategy([ 'bower_components/font-roboto/roboto.html', 'bower_components/paper-styles/color.html', - 'src/resources/ha-chart-scripts.html', ]), stripAllButEntrypointStrategy('panels/hassio/ha-panel-hassio.html') ]); diff --git a/gulp/tasks/gen-index-html.js b/gulp/tasks/gen-index-html.js index 37567bb22..4b91a9ac8 100644 --- a/gulp/tasks/gen-index-html.js +++ b/gulp/tasks/gen-index-html.js @@ -9,6 +9,7 @@ const { minifyStream } = require('../common/transform'); const buildReplaces = { '/home-assistant-polymer/build/core.js': 'core.js', '/home-assistant-polymer/src/home-assistant.html': 'frontend.html', + '/home-assistant-polymer/src/resources/ha-chart-scripts.html': 'ha-chart-scripts.html', }; function generateIndex(es6) { diff --git a/gulp/tasks/gen-service-worker.js b/gulp/tasks/gen-service-worker.js index 9e3eaa9ca..241637e10 100755 --- a/gulp/tasks/gen-service-worker.js +++ b/gulp/tasks/gen-service-worker.js @@ -30,12 +30,14 @@ const staticFingerprinted = [ const staticFingerprintedEs6 = [ 'core.js', 'frontend.html', + 'ha-chart-scripts.html', ]; const staticFingerprintedEs5 = [ 'compatibility.js', 'core.js', 'frontend.html', + 'ha-chart-scripts.html', ]; // These panels will always be registered inside HA and thus can diff --git a/gulp/tasks/rollup.js b/gulp/tasks/rollup.js index 07d3c5ee1..16f680320 100644 --- a/gulp/tasks/rollup.js +++ b/gulp/tasks/rollup.js @@ -58,7 +58,6 @@ function getRollupInputOptions(es6) { __DEMO__: JSON.stringify(DEMO), __BUILD__: JSON.stringify(es6 ? 'latest' : 'es5'), __VERSION__: JSON.stringify(VERSION), - __ROOT__: JSON.stringify(es6 ? 'frontend_latest' : 'frontend_es5'), }, }), ], diff --git a/index.html b/index.html index ffc1aaa81..018549146 100644 --- a/index.html +++ b/index.html @@ -96,6 +96,7 @@ navigator.serviceWorker.register('/service_worker.js'); }); } + window.CHART_SCRIPT = '/home-assistant-polymer/src/resources/ha-chart-scripts.html'; diff --git a/js/core.js b/js/core.js index 9367a0359..31a0434dd 100644 --- a/js/core.js +++ b/js/core.js @@ -5,7 +5,6 @@ window.HASS_DEMO = __DEMO__; window.HASS_DEV = __DEV__; window.HASS_BUILD = __BUILD__; window.HASS_VERSION = __VERSION__; -window.HASS_ROOT = __ROOT__; const init = window.createHassConnection = function (password) { const proto = window.location.protocol === 'https:' ? 'wss' : 'ws'; diff --git a/src/components/entity/ha-chart-base.html b/src/components/entity/ha-chart-base.html index 4e7b55da3..5864ef974 100644 --- a/src/components/entity/ha-chart-base.html +++ b/src/components/entity/ha-chart-base.html @@ -1,5 +1,4 @@ -