Skip to content

A reproduction repo of issue while trying to import a module using ts paths property with * in middle of string

Notifications You must be signed in to change notification settings

ivankoleda/playwright-ts-paths-bug-reproduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

playwright-ts-paths-bug-reproduction

A reproduction repo of issue while trying to import a module using ts paths property with * in middle of string

To reproduce:

yarn

playwright test fails with following error

Error: Cannot find module '<path ot dir>/playwright/packages/prefix-*/src'

yarn test // runs `playwright test`

On the other hand Typescript is able to resolve these paths, IDE works fine as well

yarn typecheck // runs `tsc --noEmit`

It fails only if you have * char inside a value of some compilerOptions.paths entry

So this works with playwright and tsc

{
  "paths": {
    "@company/prefix-app": [
      "packages/prefix-app/src"
    ],
    "@company/prefix-components": [
      "packages/prefix-components/src"
    ]
  }
}

And this fails with playwright, but works with tsc

{
  "paths": {
    "@company/prefix-*": [
      "packages/prefix-*/src"
    ]
  }
}

About

A reproduction repo of issue while trying to import a module using ts paths property with * in middle of string

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published