You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thx for sharing this repo!
I have one question.
The exports described in compoents is the output path and not include src "exports": { ".": "./dist/index.js", "./package.json": "./package.json" },
But when editing the import of comeponent in the vscode, import { Main } from '@sample/components';
it will navigate to 'sample-monorepo/packages/component/src/index'.
why is it that? I think the correct path is to the dist/index.d.ts if has build by tsc or failed to find module if hasn't build
The text was updated successfully, but these errors were encountered:
I have figured out the reason.
Since from ts3.7, instead of using .d.ts files from project references,using original source files unless the disableSourceOfProjectReferenceRedirect is open microsoft/TypeScript#32028 (comment)
according to microsoft/TypeScript#32028 (comment)
I think the declartionMap can be closed in tsconfig.base.json because the editor don't use the .d.map files now Since version 3.7.
Yes, it's the project references that cause the dev-time redirect. That's part of the point of using it... Getting that immediate update even if I didn't build.
I'm building .d.ts.map files, as I usually also publish the src folder and it's a nicer experience IMO for the npm consumer to Ctrl/Cmd+Click and jump to the source of the package he's looking at in node_modules.
thx for sharing this repo!
I have one question.
The exports described in compoents is the output path and not include src
"exports": { ".": "./dist/index.js", "./package.json": "./package.json" },
But when editing the import of comeponent in the vscode,
import { Main } from '@sample/components';
it will navigate to 'sample-monorepo/packages/component/src/index'.
why is it that? I think the correct path is to the dist/index.d.ts if has build by tsc or failed to find module if hasn't build
The text was updated successfully, but these errors were encountered: