mirror of
https://github.com/home-assistant/frontend.git
synced 2025-10-19 00:29:41 +00:00
Fix ES5 build, fix virtualizer polyfill (#7451)
This commit is contained in:
@@ -51,9 +51,6 @@ const createWebpackConfig = ({
|
||||
}),
|
||||
],
|
||||
},
|
||||
experiments: {
|
||||
topLevelAwait: true,
|
||||
},
|
||||
plugins: [
|
||||
new ManifestPlugin({
|
||||
// Only include the JS of entrypoints
|
||||
@@ -98,6 +95,15 @@ const createWebpackConfig = ({
|
||||
new RegExp(bundle.emptyPackages({ latestBuild }).join("|")),
|
||||
path.resolve(paths.polymer_dir, "src/util/empty.js")
|
||||
),
|
||||
// We need to change the import of the polyfill for EventTarget, so we replace the polyfill file with our customized one
|
||||
new webpack.NormalModuleReplacementPlugin(
|
||||
new RegExp(
|
||||
require.resolve(
|
||||
"lit-virtualizer/lib/uni-virtualizer/lib/polyfillLoaders/EventTarget.js"
|
||||
)
|
||||
),
|
||||
path.resolve(paths.polymer_dir, "src/resources/EventTarget-ponyfill.js")
|
||||
),
|
||||
],
|
||||
resolve: {
|
||||
extensions: [".ts", ".js", ".json"],
|
||||
|
Reference in New Issue
Block a user