diff --git a/tsconfig.base.json b/tsconfig.base.json index 10d347f1561..571f4cc62e4 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -5,7 +5,6 @@ "checkJs": true, "target": "ES2019", "moduleResolution": "node", - "module": "ES2015", "declaration": true, "declarationMap": true, "resolveJsonModule": true, diff --git a/tsconfig.json b/tsconfig.json index 69717ed6d9b..d35ef12857d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,15 @@ /** - * This configuration only exists for the API Extractor tool. See the details in - * CONTRIBUTING.md that describes our TypeScript setup. -*/ + * This configuration only exists for the API Extractor tool and for VSCode to use. It is NOT the tsconfig used for compilation. + * For CJS builds, `tsconfig.cjs.json` is used, and for ESM, it's `tsconfig.esm.json`. + * See the details in CONTRIBUTING.md that describes our TypeScript setup. + */ { "extends": "./tsconfig.base.json", "compilerOptions": { - "noEmit": true + "noEmit": true, + // This module setting is just for VSCode so it doesn't error when we use + // dynamic imports. + "module": "esnext" }, "include": ["src"] }