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

Show full path for location of error #11523

Closed
wants to merge 2 commits into from

Conversation

xjlim
Copy link
Contributor

@xjlim xjlim commented Nov 10, 2017

Fix #11519

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want the full path. It can be very long.

I think we might want to special case index.js specifically.

@gaearon
Copy link
Collaborator

gaearon commented Nov 10, 2017

We can also try stripping shared common ancestor directory from all lines in the stack.

@xjlim
Copy link
Contributor Author

xjlim commented Nov 11, 2017

image
@gaearon I tried removing the common head of the files in stacktrace, is this what you meant?

@xjlim
Copy link
Contributor Author

xjlim commented Nov 11, 2017

Alternative is to include app's root directory in element.__source and stripping that off the filename but that require changing babel-plugin-transform-react-jsx-source.

@gaearon
Copy link
Collaborator

gaearon commented Nov 13, 2017

We can't reliably detect app directory since people run Babel in all sorts of configurations.

I think this is an interesting approach. I'm going to be away this week but I'll review when I get back.

@gaearon
Copy link
Collaborator

gaearon commented May 13, 2018

Sorry—we're stretched really thin and don't have the bandwidth for reviewing community PRs until much later this year 😞

@xjlim
Copy link
Contributor Author

xjlim commented May 13, 2018

No worries. I should have followed up sooner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants