Skip to content

Commit

Permalink
add swc target es2022
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed Nov 1, 2021
1 parent bc03a3e commit 86ea83a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/transpilers/swc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ targetMapping.set(/* ts.ScriptTarget.ES2018 */ 5, 'es2018');
targetMapping.set(/* ts.ScriptTarget.ES2019 */ 6, 'es2019');
targetMapping.set(/* ts.ScriptTarget.ES2020 */ 7, 'es2020');
targetMapping.set(/* ts.ScriptTarget.ES2021 */ 8, 'es2021');
targetMapping.set(/* ts.ScriptTarget.ESNext */ 99, 'es2021');
targetMapping.set(/* ts.ScriptTarget.ESNext */ 99, 'es2022');

type SwcTarget = typeof swcTargets[number];
/**
Expand All @@ -160,6 +160,7 @@ const swcTargets = [
'es2019',
'es2020',
'es2021',
'es2022'
] as const;

const ModuleKind = {
Expand Down

0 comments on commit 86ea83a

Please sign in to comment.