_From @niedzielski on February 26, 2017 3:50_
Steps to Reproduce:
The expected result is to go to the definition in the local JavaScript files. The actual result is to go to the definition in the bundle.
foo import.The expected result is to go to the definition of foo in src/index.js. The actual result is to go to the definition in the build product, build/index.js.
We transpile and bundle our code to applib.js and a corresponding map, applib.js.map. The code that is exercised by our unit tests comes from this bundle directly. This is partially due to the suggested Rollup configuration but also means the same code exercised is the same code distributed. Unfortunately, go to defintion of applib.CollapseElement.getTableHeader goes to the bundled code instead of the original sources under src/.
_Copied from original issue: Microsoft/vscode#21433_
Moving over to TypeScript since this does not seem like an issue with VSCode itself. I'm not sure if a jsconfig.json can be configured so that Go To Definition behaves as @niedzielski would like in this case
Doesn't seem to be much demand for this. We can revive if needed since we now have sourcemap reading support
I would REALLY like support for this. All of the shared React-adjacent libraries within our company are transpiled, so Go to Definition is essentially broken for all of them.
I'm not sure if there's a better pattern to follow (can I have webpack transpile imports instead of pre-transpiling when publishing, perhaps?), but it's a missing feature that introduces a decent amount for friction for developers when they want to trace behavior back to the source.
Same. The case is simple. We have our own library which is transpiled to ES5 (has to be, because it uses different JS standard, different babel config) and linked to our project through npm link. We simply want
"Go to Definition" to go to the source of the component rather than the transpiled version.
I'd also love to see such a feature being implemented. Especially for monorepos (lerna or yarn workspaces) this totally would make sense.
Currently I'm using the following VS Code extension as a workaround: https://marketplace.visualstudio.com/items?itemName=vlkoti.vscode-sourcemaps-navigator
Most helpful comment
I would REALLY like support for this. All of the shared React-adjacent libraries within our company are transpiled, so Go to Definition is essentially broken for all of them.
I'm not sure if there's a better pattern to follow (can I have webpack transpile imports instead of pre-transpiling when publishing, perhaps?), but it's a missing feature that introduces a decent amount for friction for developers when they want to trace behavior back to the source.