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

Make filenames / paths in error messages links to source files #103

Open
0x80 opened this issue May 30, 2016 · 3 comments
Open

Make filenames / paths in error messages links to source files #103

0x80 opened this issue May 30, 2016 · 3 comments

Comments

@0x80
Copy link

0x80 commented May 30, 2016

With webpack-dev-server syntax errors appeared in the browser console with a clickable link to the source. Can I achieve the same with hot middleware?

@glenjamin
Copy link
Collaborator

It should be possible, yes - we'd just need to figure out what webpack-dev-server was doing for formatting that this module isn't.

It might also be possible to use the same approach in the overlay.

I'm unlikely to find any time to work on this in the near future, but more investigationg or PRs will be gladly welcomed & I can assist from there.

@glenjamin glenjamin changed the title Is it possible to get syntax errors logged in the console with clickable links to the source? Make filenames / paths in error messages links to source files May 30, 2016
@0x80
Copy link
Author

0x80 commented Jun 4, 2016

On second thought I don't think this is very useful. As I understand it, the clickable error will point you to the source (map) of the files that were compiled last before the syntax error occurred, since a syntax error will never result in a source map.

@glenjamin
Copy link
Collaborator

Babel's syntax errors give you the file and line number, so linking to the location should be possible I reckon.

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

No branches or pull requests

2 participants