-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'src' to package.json files in templates to improve source maps #252
Conversation
Actually I think I am wrong on this one, it seems that the source map includes all source code content as well. @jaredpalmer can you confirm this? |
I think sourcemaps work fine (formik uses them) |
but maybe not since the rollup-plugin-ts update? |
Nah I think I made a mistake 😅 sorry |
Seems very related to #494 -- @justingrant could you elaborate here on why Based on your issues in other places, is this just to be able to add breakpoints in the library source code when debugging? Or is it necessary for "Peek" / "Go to Definition" too? And maybe other things I'm missing? |
@agilgur5 - here's a few reasons why including src is helpful, especially for IDE users:
|
Thanks for the great write-up @justingrant ! I didn't know about the VSCode base paths Issue 😰 In any case, I'll re-open and merge this PR. Or rather, apparently can't re-open as the repo/branch doesn't exist any more on the fork, so I'll have to open a new PR |
@agilgur5 - my understanding is that Go to Definition will navigate to a library's original source if: a) there's a valid declaration map (.d.ts.map); AND b) the original source files that the declaration map refers to are present on disk. That said I've been told on another thread that folks can't get declaration maps working at all (even if the conditions above are satisfied) so there may be some other problem going on. Regardless, I strongly suspect that Go To Definition won't go to original source if the original source files are missing, because AFAIK the IDE won't load the source in the sourcemap file unless the debugger is running. |
Gotcha. Thanks for filling in the knowledge gaps! I opened and merged #620 (while crediting OP here) to add @allcontributors please add @justingrant for questions |
This comment has been minimized.
This comment has been minimized.
@allcontributors please add @justingrant for questions it seems to fail occasionally if you only mention one type of contribution 🤷♂ |
I've put up a pull request to add @justingrant! 🎉 |
Since source maps point to
../src/*
if people don't publish thesrc
folder, source maps are not that useful.