diff --git a/demo/webpack.config.js b/demo/webpack.config.js index 2e87ffd692..851a983f30 100644 --- a/demo/webpack.config.js +++ b/demo/webpack.config.js @@ -8,7 +8,7 @@ const { minimizer } = require("../config/babel.js"); const isProd = process.env.NODE_ENV === "production"; const chunkFilename = isProd ? "chunk.[chunkhash].js" : "[name].chunk.js"; const buildPath = path.resolve(__dirname, "dist"); -const publicPath = "./"; +const publicPath = "/"; const latestBuild = false; diff --git a/src/layouts/app/home-assistant.ts b/src/layouts/app/home-assistant.ts index 3724fac607..46fc89a84f 100644 --- a/src/layouts/app/home-assistant.ts +++ b/src/layouts/app/home-assistant.ts @@ -98,10 +98,12 @@ export class HomeAssistantAppEl extends ext(HassBaseMixin(LitElement), [ private _routeChanged(ev) { const route = ev.detail.value as Route; - // If it's the first route that we process, // check if we should navigate away from / - if (this._route === undefined && route.path === "/") { + if ( + this._route === undefined && + (route.path === "" || route.path === "/") + ) { navigate(window, `/${localStorage.defaultPage || DEFAULT_PANEL}`, true); return; }