-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use .ts
extension when creating Playwright config for TypeScript projects
#4194
Comments
I believe you're looking for: "test": "PW_EXPERIMENTAL_TS_ESM=1 playwright test" example implementation: https://github.com/vhscom/svelte-headlessui-starter |
Is there another way to configure that besides the env var? Setting env vars like that in Windows wouldn't work, and it'd be lovely not to bring in another dependency just to smooth over that cross-platform issue. |
Last update I saw for ESM in TS for Playwrite dated Jan 11: microsoft/playwright#7121 (comment). I'd expect the ENV var to simply become optional later, but since this flag was recently introduced I haven't dug in deeper yet. |
I opened this some time ago and I'm waiting for the next version. After this TS code is usable. microsoft/playwright#12307 |
Testing this on the latest versions appears to result in the following issue:
(And a reproduction of the issue) |
Appears to have started with 1.0.0-next.292 when using You're using experimental features, so I'll assume you know how to upgrade and downgrade your version of Node. |
Works again with the latest version of Playwright (1.20), which has been released just now. |
|
|
With the latest release of SvelteKit, when you setup a new Playwright+TypeScript project it is now working without needing any further changes However, if I rename |
.ts
extension when creating Playwright config for TypeScript projects
Use 1.20.0, they are fixing bugs with 1.20.1. |
I think this can be closed now? #4479 |
I'm using SvelteKit with PW 1.20.2 with no problem and Typescript. I think we can close. |
Describe the bug
I've seen a few reports of this. It appears to have been a known issue when the feature was added: #4056 (comment)
I saw that someone fixed it by prefixing with some environment variable. Unforunately, I can't find what that was at the moment
Reproduction
Create TypeScript + Playwright project from wizard
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: