Skip to content

Commit

Permalink
Add CoreJS polyfills to modern build (#20676)
Browse files Browse the repository at this point in the history
  • Loading branch information
steverep authored Jun 21, 2024
1 parent 039e9b4 commit 686424f
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 34 deletions.
4 changes: 2 additions & 2 deletions build-scripts/bundle.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
[
"@babel/preset-env",
{
useBuiltIns: latestBuild ? false : "usage",
corejs: latestBuild ? false : dependencies["core-js"],
useBuiltIns: "usage",
corejs: dependencies["core-js"],
bugfixes: true,
shippedProposals: true,
},
Expand Down
1 change: 0 additions & 1 deletion src/entrypoints/authorize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import "../resources/compatibility";
import "../auth/ha-authorize";
import "../resources/safari-14-attachshadow-patch";
import "../resources/array.flat.polyfill";

import("../resources/ha-style");
import("@polymer/polymer/lib/utils/settings").then(
Expand Down
1 change: 0 additions & 1 deletion src/entrypoints/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { subscribePanels } from "../data/ws-panels";
import { subscribeThemes } from "../data/ws-themes";
import { subscribeUser } from "../data/ws-user";
import type { ExternalAuth } from "../external_app/external_auth";
import "../resources/array.flat.polyfill";
import "../resources/safari-14-attachshadow-patch";

window.name = MAIN_WINDOW_NAME;
Expand Down
1 change: 0 additions & 1 deletion src/entrypoints/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import "../resources/compatibility";
import "../onboarding/ha-onboarding";
import "../resources/safari-14-attachshadow-patch";
import "../resources/array.flat.polyfill";

import("../resources/ha-style");
import("@polymer/polymer/lib/utils/settings").then(
Expand Down
28 changes: 0 additions & 28 deletions src/resources/array.flat.polyfill.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/resources/log-message.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "core-js/modules/web.url.can-parse";
import { fromError } from "stacktrace-js";
import { UAParser } from "ua-parser-js";

Expand Down

0 comments on commit 686424f

Please sign in to comment.