1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-05-08 17:28:46 +01:00

Revert "Use ES modules and dynamic import for Webpack latest builds (… (#16679)

Revert "Use ES modules and dynamic import for Webpack latest builds (#16620)"

This reverts commit 7b350e31dd.
This commit is contained in:
Bram Kragten
2023-05-30 23:56:38 +02:00
committed by GitHub
parent 5218e1352e
commit d914fb0cfc
4 changed files with 3 additions and 16 deletions
-1
View File
@@ -77,7 +77,6 @@ module.exports.htmlMinifierOptions = {
module.exports.terserOptions = ({ latestBuild, isTestBuild }) => ({
safari10: !latestBuild,
ecma: latestBuild ? 2015 : 5,
module: latestBuild,
format: { comments: false },
sourceMap: !isTestBuild,
});
+2 -3
View File
@@ -41,7 +41,7 @@ const createWebpackConfig = ({
return {
name,
mode: isProdBuild ? "production" : "development",
target: `browserslist:${latestBuild ? "modern" : "legacy"}`,
target: ["web", latestBuild ? "es2017" : "es5"],
// For tests/CI, source maps are skipped to gain build speed
// For production, generate source maps for accurate stack traces without source code
// For development, generate "cheap" versions that can map to original line numbers
@@ -163,7 +163,6 @@ const createWebpackConfig = ({
},
},
output: {
module: latestBuild,
filename: ({ chunk }) =>
!isProdBuild || isStatsBuild || dontHash.has(chunk.name)
? "[name].js"
@@ -197,7 +196,7 @@ const createWebpackConfig = ({
: undefined,
},
experiments: {
outputModule: true,
topLevelAwait: true,
},
};
};