Cannot find modules (third-party libraries) with Yarn 3
Greetings and thank you for this useful plugin.
I tried to you use your plugin with a Yarn 3 setup but it seems to struggle finding modules as there is no node_modules folder with Yarn 3. Any clue?
I'm also experiencing this problem, everything was fine until I switched yarn 3 to use Plug'n'Play thereby eliminating node_modules...

I face the exact same issue with Yarn3 PnP. Is there another way to get this working without opting out of Yarn PnP
Did anyone find a workaround yet? This basically makes it unusable for our library since most generated types resolve to any.
No workaround for this plugin, but you can chain a npm script that runs tsc after vite e.g.
"dev": "yarn build-src -w & yarn build-dts --watch",
"build": "yarn build-src && yarn build-dts",
"build-src": "vite build",
"build-dts": "tsc --project tsconfig.dts.json"
./tsconfig.dts.json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"noEmit": false,
"emitDeclarationOnly": true,
"outDir": "dist"
}
"include": ["src"]
}
Awesome, that works for me, thanks!
Would be nice if the plugin could be updated to do the same.
@qmhc this is occurring with yarn v3 and nodeLinker set to node_modules – so, not using pnp and still facing this issue. Occurs regardless of vite-plugin-dts version used.