From 9855a3f3b0e59d6c9ba65b758c7d03d68576ff2d Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Sat, 14 May 2022 16:29:28 +0800 Subject: [PATCH] add sourceType in Babel config --- packages/docusaurus/src/babel/preset.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docusaurus/src/babel/preset.ts b/packages/docusaurus/src/babel/preset.ts index 3dd351ef9ac5c..3f92315190834 100644 --- a/packages/docusaurus/src/babel/preset.ts +++ b/packages/docusaurus/src/babel/preset.ts @@ -16,6 +16,7 @@ function getTransformOptions(isServer: boolean): TransformOptions { // All optional newlines and whitespace will be omitted when generating code // in compact mode compact: true, + sourceType: 'module', presets: [ isServer ? [