docs: mention node 16 requirement for ts + esm (#15866)

This commit is contained in:
Dmitry Gozman 2022-07-21 19:21:49 -07:00 committed by GitHub
parent 618941fc68
commit 532cf45393
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -67,6 +67,10 @@ test('example', async ({ page }) => {
});
```
:::note
TypeScript with ESM requires Node.js 16 or higher.
:::
## TypeScript path mapping
If you use [path mapping](https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping) in your `tsconfig.json`, Playwright Test will pick it up. Make sure that `baseUrl` is also set.

View File

@ -30,7 +30,11 @@ await page.evaluate(`(async() => {
### ReferenceError: URL is not defined
Playwright requires Node.js 14 or higher. Node.js 8 is not supported, and will cause you to receive this error.
Playwright requires Node.js 14 or higher.
### Unknown file extension ".ts"
Running TypeScript tests in `"type": "module"` project requires Node.js 16 or higher.
# Please file an issue