Always use target ES2021 (#25170)

pull/25172/head
Bram Kragten 2025-04-25 11:04:05 +02:00 committed by GitHub
parent 221e1d9ed8
commit 488599905b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View File

@ -74,11 +74,11 @@ module.exports.terserOptions = ({ latestBuild, isTestBuild }) => ({
});
/** @type {import('@rspack/core').SwcLoaderOptions} */
module.exports.swcOptions = ({ latestBuild }) => ({
module.exports.swcOptions = () => ({
jsc: {
loose: true,
externalHelpers: true,
target: latestBuild ? "ES2021" : "ES5",
target: "ES2021",
parser: {
syntax: "typescript",
decorators: true,

View File

@ -82,9 +82,7 @@ const createRspackConfig = ({
},
{
loader: "builtin:swc-loader",
options: bundle.swcOptions({
latestBuild,
}),
options: bundle.swcOptions(),
},
],
resolve: {