Skip to content
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

Source Maps not resolved. #579

Closed
kishanio opened this issue Mar 12, 2020 · 3 comments
Closed

Source Maps not resolved. #579

kishanio opened this issue Mar 12, 2020 · 3 comments
Labels
problem: no repro No reproduction was provided (and have not tried to repro without one) problem: stale Issue has not been responded to in some time

Comments

@kishanio
Copy link

kishanio commented Mar 12, 2020

Current Behavior

SourceMaps not working.

It seems like they are being emitted by TSdx build chain. Though not being able to be picked up via. React CRA.

Screenshot 2020-03-12 at 12 54 01 PM

Screenshot 2020-03-12 at 12 56 41 PM

Mapping files seems to point to ./src.

Expected behavior

Source maps should resolve.

Suggested solution(s)

After reading through #494 , it seems like src folder need to specified in package.json > files. Tried doing so though its not working and ideally it would be great if not including src with package.

Additional context

Out of box TSdx along side inside Lerna MonoRepo. Core SDK bundled via. TSdx & thereby consumed via. React CRA.

Your environment

Software Version(s)
TSDX ^0.12.3
TypeScript ^3.8.2
Browser Version 80.0.3987.132 (Official Build) (64-bit)
npm/Yarn 1.22.4
Node 10.16
Operating System Mac OS X Catalina 10.15.
@agilgur5
Copy link
Collaborator

agilgur5 commented Mar 12, 2020

Sorry, I'm not sure what you mean by "not being picked up", I'm not sure where your output is coming from and you didn't provide a repro. What do you expect it to look like?

ideally it would be great if not including src with package.

I'm no expert on it, but maybe you're misinterpreting that issue and how to use sourcemaps to their full extent. You can't "go to definition" without the definition, i.e. the source. The sourcemap is a mapping from dist to src, you can't view the source without the source, src.
It's not strictly necessary for sourcemaps, but it can help the debugging experience in many ways.
EDIT: see #252 (comment) for more details on this

@agilgur5
Copy link
Collaborator

agilgur5 commented Mar 12, 2020

OH, I misread this:

Mapping files seems to point to ./src.

If it's in dist, then it should point to ../src. So that's an issue.

I'm not sure if this is the exact problem, but what's your tsconfig rootDir set to?
Try setting it rootDir to ./src

@agilgur5 agilgur5 added problem: no repro No reproduction was provided (and have not tried to repro without one) problem: stale Issue has not been responded to in some time labels Mar 13, 2020
@agilgur5
Copy link
Collaborator

Closing as stale with no repro provided. Repros are always extremely helpful, and with sourcemaps it's near impossible to debug without one.

All of my packages seem to have ../src regardless of which rootDir (./ or ./src), so it seems like something else is going on here too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem: no repro No reproduction was provided (and have not tried to repro without one) problem: stale Issue has not been responded to in some time
Projects
None yet
Development

No branches or pull requests

2 participants