wallabyjs / quokka

Repository for Quokka.js questions and issues
https://quokkajs.com
1.17k stars 31 forks source link

TS Paths in monorepo #946

Closed devastion closed 3 months ago

devastion commented 3 months ago

Issue description or question

Cannot resolve tsconfig paths in monorepo.

I have the following structure

- tsconfig.base.json
- packages
- - package-a
- - - tsconfig.json (with paths)
- - - - src/index.ts (import from paths)

Is this issue related to Quokka not outputting the expected results of your code?: Yes

Sample code

// paste the code you are running here

Sample repository link

https://github.com/devastion/eslint-config

If the issue can not be reproduced just using the quokka file above (for example because it requires/imports some files from your project), please create a small repository where the issue can be reproduced.

Quokka.js Console Output

​Install "@plugins/javascript" package for the current quokka file​
​Install "@plugins/javascript" package into the project​
 
Cannot find package '@plugins/javascript' imported from /Users/<username>/.quokka/packages/eslint-plugins/src/index.js 
    at packageResolve (node:internal/modules/esm/resolve:854:9) 
    at moduleResolve (node:internal/modules/esm/resolve:927:18) 
    at defaultResolve (node:internal/modules/esm/resolve:1157:11) 
    at nextResolve (node:internal/modules/esm/hooks:866:28) 
    at async nextResolve (node:internal/modules/esm/hooks:866:22) 
    at async Hooks.resolve (node:internal/modules/esm/hooks:304:24) 
    at async MessagePort.handleMessage (node:internal/modules/esm/worker:196:18)

Code editor version

Visual Studio Code v1.88.0

OS name and version

MacOS Sonoma 14.4.1

smcenlly commented 3 months ago

Thanks for reporting your problem. We have found and fixed an issue that would cause Quokka to fail when using non-root baseUrl. This is fixed in Quokka for VS Code, v1.0.635.