aleclarson / vite-tsconfig-paths

Support for TypeScript's path mapping in Vite
MIT License
1.24k stars 43 forks source link

Use workspace globs to infer `projects` option #73

Closed aleclarson closed 1 year ago

aleclarson commented 1 year ago

If the projects option is undefined, search up parent directories for nearest package.json or pnpm-workspace.yaml. If a package.json is found, check for a workspaces field (which implies a Yarn workspace). If a pnpm-workspace.yaml file is found, parse it and use its packages field. In both cases, resolve the array of globs into a list of directories. Then crawl each directory that isn't a descendant of the (explicit or implicit) root option of this plugin, in search of tsconfig.json files.