Skip to content

Commit

Permalink
fix: enable latest syntax when parsing for ssr
Browse files Browse the repository at this point in the history
close #2526
  • Loading branch information
yyx990803 committed Mar 16, 2021
1 parent bcd458b commit 407ce3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/ssr/ssrTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function ssrTransform(

const ast = parser.parse(code, {
sourceType: 'module',
ecmaVersion: 2020,
ecmaVersion: 2021,
locations: true
}) as any

Expand Down

0 comments on commit 407ce3b

Please sign in to comment.