Skip to content

Commit 407ce3b

Browse files
committed
fix: enable latest syntax when parsing for ssr
close #2526
1 parent bcd458b commit 407ce3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/node/ssr/ssrTransform.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export async function ssrTransform(
3333

3434
const ast = parser.parse(code, {
3535
sourceType: 'module',
36-
ecmaVersion: 2020,
36+
ecmaVersion: 2021,
3737
locations: true
3838
}) as any
3939

0 commit comments

Comments
 (0)