mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 07:16:39 +00:00
Always use target ES2021 (#25170)
This commit is contained in:
parent
221e1d9ed8
commit
488599905b
@ -74,11 +74,11 @@ module.exports.terserOptions = ({ latestBuild, isTestBuild }) => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
/** @type {import('@rspack/core').SwcLoaderOptions} */
|
/** @type {import('@rspack/core').SwcLoaderOptions} */
|
||||||
module.exports.swcOptions = ({ latestBuild }) => ({
|
module.exports.swcOptions = () => ({
|
||||||
jsc: {
|
jsc: {
|
||||||
loose: true,
|
loose: true,
|
||||||
externalHelpers: true,
|
externalHelpers: true,
|
||||||
target: latestBuild ? "ES2021" : "ES5",
|
target: "ES2021",
|
||||||
parser: {
|
parser: {
|
||||||
syntax: "typescript",
|
syntax: "typescript",
|
||||||
decorators: true,
|
decorators: true,
|
||||||
|
@ -82,9 +82,7 @@ const createRspackConfig = ({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
loader: "builtin:swc-loader",
|
loader: "builtin:swc-loader",
|
||||||
options: bundle.swcOptions({
|
options: bundle.swcOptions(),
|
||||||
latestBuild,
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user