Skip to content

Commit 1b4b12c

Browse files
committed
fix: map "es6" to "es2015"
1 parent 8ffe5da commit 1b4b12c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core/src/utils/syntax.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ export function transformSyntaxToRspackTarget(
173173
) {
174174
return 'es2022';
175175
}
176-
176+
// The es6 is the same as es2015, compatible with rspack API schema
177+
if (normalizedSyntaxItem === 'es6') {
178+
return 'es2015';
179+
}
177180
return normalizedSyntaxItem;
178181
}
179182

0 commit comments

Comments
 (0)