mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: set module
to esnext
in tsconfig.json
(#7256)
The main `tsconfig.json` file is only used for API Extractor, and by VSCode to provide type information. It is _not_ used to compile Puppeteer for shipping. Therefore we can specify `module: "esnext"` in here so that VSCode knows we can use all the latest and greatest module features (primarily, dynamic imports). In `tsconfig.cjs.json` and `tsconfig.esm.json` we set the `module` setting for CJS/ESM respectively.
This commit is contained in:
parent
d01aa6c84a
commit
8340cb7c34
@ -5,7 +5,6 @@
|
|||||||
"checkJs": true,
|
"checkJs": true,
|
||||||
"target": "ES2019",
|
"target": "ES2019",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"module": "ES2015",
|
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
/**
|
/**
|
||||||
* This configuration only exists for the API Extractor tool. See the details in
|
* This configuration only exists for the API Extractor tool and for VSCode to use. It is NOT the tsconfig used for compilation.
|
||||||
* CONTRIBUTING.md that describes our TypeScript setup.
|
* 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",
|
"extends": "./tsconfig.base.json",
|
||||||
"compilerOptions": {
|
"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"]
|
"include": ["src"]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user