mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Prefer target over environment (#8092)
This commit is contained in:
parent
f2e9b3577d
commit
607eb6d130
@ -36,6 +36,7 @@ const createWebpackConfig = ({
|
|||||||
const ignorePackages = bundle.ignorePackages({ latestBuild });
|
const ignorePackages = bundle.ignorePackages({ latestBuild });
|
||||||
return {
|
return {
|
||||||
mode: isProdBuild ? "production" : "development",
|
mode: isProdBuild ? "production" : "development",
|
||||||
|
target: ["web", latestBuild ? "es2017" : "es5"],
|
||||||
devtool: isProdBuild
|
devtool: isProdBuild
|
||||||
? "cheap-module-source-map"
|
? "cheap-module-source-map"
|
||||||
: "eval-cheap-module-source-map",
|
: "eval-cheap-module-source-map",
|
||||||
@ -131,22 +132,6 @@ const createWebpackConfig = ({
|
|||||||
}
|
}
|
||||||
return `${chunk.name}.${chunk.hash.substr(0, 8)}.js`;
|
return `${chunk.name}.${chunk.hash.substr(0, 8)}.js`;
|
||||||
},
|
},
|
||||||
environment: {
|
|
||||||
// The environment supports arrow functions ('() => { ... }').
|
|
||||||
arrowFunction: latestBuild,
|
|
||||||
// The environment supports BigInt as literal (123n).
|
|
||||||
bigIntLiteral: false,
|
|
||||||
// The environment supports const and let for variable declarations.
|
|
||||||
const: latestBuild,
|
|
||||||
// The environment supports destructuring ('{ a, b } = obj').
|
|
||||||
destructuring: latestBuild,
|
|
||||||
// The environment supports an async import() function to import EcmaScript modules.
|
|
||||||
dynamicImport: latestBuild,
|
|
||||||
// The environment supports 'for of' iteration ('for (const x of array) { ... }').
|
|
||||||
forOf: latestBuild,
|
|
||||||
// The environment supports ECMAScript Module syntax to import ECMAScript modules (import ... from '...').
|
|
||||||
module: latestBuild,
|
|
||||||
},
|
|
||||||
chunkFilename:
|
chunkFilename:
|
||||||
isProdBuild && !isStatsBuild
|
isProdBuild && !isStatsBuild
|
||||||
? "chunk.[chunkhash].js"
|
? "chunk.[chunkhash].js"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user