diff --git a/demo/public/api/camera_proxy_stream/camera.backyard b/demo/public/api/camera_proxy_stream/camera.backyard
new file mode 100644
index 0000000000..25120b26bf
Binary files /dev/null and b/demo/public/api/camera_proxy_stream/camera.backyard differ
diff --git a/demo/public/api/camera_proxy_stream/camera.driveway b/demo/public/api/camera_proxy_stream/camera.driveway
new file mode 100644
index 0000000000..746c30267e
Binary files /dev/null and b/demo/public/api/camera_proxy_stream/camera.driveway differ
diff --git a/demo/public/api/camera_proxy_stream/camera.patio b/demo/public/api/camera_proxy_stream/camera.patio
new file mode 100644
index 0000000000..746c30267e
Binary files /dev/null and b/demo/public/api/camera_proxy_stream/camera.patio differ
diff --git a/demo/public/api/camera_proxy_stream/camera.porch b/demo/public/api/camera_proxy_stream/camera.porch
new file mode 100644
index 0000000000..3527dc52bf
Binary files /dev/null and b/demo/public/api/camera_proxy_stream/camera.porch differ
diff --git a/demo/public/index.html b/demo/public/index.html
index fae365931d..84b16d37c0 100644
--- a/demo/public/index.html
+++ b/demo/public/index.html
@@ -2,6 +2,46 @@
Entity not available: ${this._config.entity}
diff --git a/src/util/register-service-worker.js b/src/util/register-service-worker.js
index 89b7d9bc0c..6b1ed8348e 100644
--- a/src/util/register-service-worker.js
+++ b/src/util/register-service-worker.js
@@ -1,8 +1,8 @@
const serviceWorkerUrl =
- __BUILD__ === "latest" ? "/service_worker.js" : "/service_worker_es5";
+ __BUILD__ === "latest" ? "/service_worker.js" : "/service_worker_es5.js";
export default () => {
- if (!("serviceWorker" in navigator) || __DEMO__) return;
+ if (!("serviceWorker" in navigator)) return;
navigator.serviceWorker.register(serviceWorkerUrl).then((reg) => {
reg.addEventListener("updatefound", () => {
diff --git a/webpack.config.js b/webpack.config.js
index 1b8b359e4f..cb618e61d3 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -167,6 +167,23 @@ function createConfig(isProdBuild, latestBuild) {
return zopfli.gzip(input, compressionOptions, callback);
},
}),
+ new HtmlWebpackPlugin({
+ inject: false,
+ template: "./src/html/index.html.template",
+ // Default templateParameterGenerator code
+ // https://github.com/jantimon/html-webpack-plugin/blob/master/index.js#L719
+ templateParameters: (compilation, assets, option) => ({
+ latestBuild,
+ compatibility: assets.chunks.compatibility.entry,
+ appJS: assets.chunks.app.entry,
+ coreJS: assets.chunks.core.entry,
+ customPanelJS: assets.chunks["custom-panel"].entry,
+ hassIconsJS: assets.chunks["hass-icons"].entry,
+ }),
+ filename: `index.html`,
+ }),
+ generateJSPage("onboarding", latestBuild),
+ generateJSPage("authorize", latestBuild),
new WorkboxPlugin.InjectManifest({
swSrc: "./src/entrypoints/service-worker-bootstrap.js",
swDest: "service_worker.js",
@@ -194,23 +211,6 @@ function createConfig(isProdBuild, latestBuild) {
"node_modules/@polymer/font-roboto-local/fonts/roboto/Roboto-Bold.ttf",
},
}),
- new HtmlWebpackPlugin({
- inject: false,
- template: "./src/html/index.html.template",
- // Default templateParameterGenerator code
- // https://github.com/jantimon/html-webpack-plugin/blob/master/index.js#L719
- templateParameters: (compilation, assets, option) => ({
- latestBuild,
- compatibility: assets.chunks.compatibility.entry,
- appJS: assets.chunks.app.entry,
- coreJS: assets.chunks.core.entry,
- customPanelJS: assets.chunks["custom-panel"].entry,
- hassIconsJS: assets.chunks["hass-icons"].entry,
- }),
- filename: `index.html`,
- }),
- generateJSPage("onboarding", latestBuild),
- generateJSPage("authorize", latestBuild),
].filter(Boolean),
output: {
filename: ({ chunk }) => {