Hi.
I have a sveltekit application I am trying to set up with playwright.
I want to be able to import from a .ts file into my tests but get an error in the lines of:
"Cannot find module /path/to/module-x imported from /a/test.ts".
I have a simple repro here, run npm i, npm run build and npm run test to reproduce the error.
Adding ".js" to the import turns the compiler into thinking that my alias $lib is a package, which is not the case.
My tsconfig has paths and baseUrl set correctly, i have tried to explicitly (without relying on extends) set baseUrl and paths to no avail.
Thankful for any feedback on this.
Hi.
I have a sveltekit application I am trying to set up with playwright.
I want to be able to import from a .ts file into my tests but get an error in the lines of:
"Cannot find module
/path/to/module-ximported from/a/test.ts".I have a simple repro here, run
npm i,npm run buildandnpm run testto reproduce the error.Adding ".js" to the import turns the compiler into thinking that my alias
$libis a package, which is not the case.My tsconfig has
pathsandbaseUrlset correctly, i have tried to explicitly (without relying onextends) setbaseUrlandpathsto no avail.Thankful for any feedback on this.