Skip to content

Commit 76514ba

Browse files
authored
Fix landing page build (#27817)
1 parent b6abbda commit 76514ba

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

build-scripts/bundle.cjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ module.exports.sourceMapURL = () => {
1818
module.exports.ignorePackages = () => [];
1919

2020
// Files from NPM packages that we should replace with empty file
21-
module.exports.emptyPackages = ({ isHassioBuild }) =>
21+
module.exports.emptyPackages = ({ isHassioBuild, isLandingPageBuild }) =>
2222
[
2323
require.resolve("@vaadin/vaadin-material-styles/typography.js"),
2424
require.resolve("@vaadin/vaadin-material-styles/font-icons.js"),
2525
// Icons in supervisor conflict with icons in HA so we don't load.
26-
isHassioBuild &&
26+
(isHassioBuild || isLandingPageBuild) &&
2727
require.resolve(
2828
path.resolve(paths.root_dir, "src/components/ha-icon.ts")
2929
),
30-
isHassioBuild &&
30+
(isHassioBuild || isLandingPageBuild) &&
3131
require.resolve(
3232
path.resolve(paths.root_dir, "src/components/ha-icon-picker.ts")
3333
),
@@ -337,6 +337,7 @@ module.exports.config = {
337337
publicPath: publicPath(latestBuild),
338338
isProdBuild,
339339
latestBuild,
340+
isLandingPageBuild: true,
340341
};
341342
},
342343
};

build-scripts/rspack.cjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const createRspackConfig = ({
4141
isStatsBuild,
4242
isTestBuild,
4343
isHassioBuild,
44+
isLandingPageBuild,
4445
dontHash,
4546
}) => {
4647
if (!dontHash) {
@@ -168,7 +169,9 @@ const createRspackConfig = ({
168169
},
169170
}),
170171
new rspack.NormalModuleReplacementPlugin(
171-
new RegExp(bundle.emptyPackages({ isHassioBuild }).join("|")),
172+
new RegExp(
173+
bundle.emptyPackages({ isHassioBuild, isLandingPageBuild }).join("|")
174+
),
172175
path.resolve(paths.root_dir, "src/util/empty.js")
173176
),
174177
!isProdBuild && new LogStartCompilePlugin(),

src/components/ha-generic-picker.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import type { HomeAssistant } from "../types";
1010
import "./ha-bottom-sheet";
1111
import "./ha-button";
1212
import "./ha-combo-box-item";
13-
import "./ha-icon-button";
1413
import "./ha-input-helper-text";
1514
import "./ha-picker-combo-box";
1615
import type {

0 commit comments

Comments
 (0)