diff --git a/docs/src/test-typescript-js.md b/docs/src/test-typescript-js.md index 0cb5cc8b63..6062954a43 100644 --- a/docs/src/test-typescript-js.md +++ b/docs/src/test-typescript-js.md @@ -88,7 +88,7 @@ The `pretest` script runs typescript on the tests. `test` will run the tests tha Then `npm run test` will build the tests and run them. -## Transpilation issues +## Using `import` inside `evaluate()` Using dynamic imports inside a function passed to various `evaluate()` methods is not supported. This is because Playwright uses `Function.prototype.toString()` to serialize functions, and transpiler will sometimes replace dynamic imports with `require()` calls, which are not valid inside the web page.