diff --git a/packages/vite/src/node/ssr/ssrTransform.ts b/packages/vite/src/node/ssr/ssrTransform.ts index 440d43eea47455..52bdd48b4d13ce 100644 --- a/packages/vite/src/node/ssr/ssrTransform.ts +++ b/packages/vite/src/node/ssr/ssrTransform.ts @@ -33,7 +33,7 @@ export async function ssrTransform( const ast = parser.parse(code, { sourceType: 'module', - ecmaVersion: 2020, + ecmaVersion: 2021, locations: true }) as any