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

Add source maps to module server #126

Merged
merged 3 commits into from
Jun 30, 2021
Merged

Add source maps to module server #126

merged 3 commits into from
Jun 30, 2021

Conversation

calebeby
Copy link
Member

@calebeby calebeby commented Jun 29, 2021

Now if code in runJS or loadJS, or imported by either of those, triggers an error, the error stack is source-mapped back to correct locations. Here's the original PR that implemented this for the vite-based server. That PR has screenshots showing the feature.

The tests pretty well cover the feature so I don't think manual testing is needed.

@calebeby calebeby changed the title Add direct CSS loading and static file loading to module server Add source maps to module server Jun 30, 2021
src/index.ts Outdated Show resolved Hide resolved
Comment on lines +34 to +35
// Create a new console instance instead of using the global one
// Because the global one is overridden by Jest, and it adds a misleading second stack trace and code frame below it
Copy link
Member

Choose a reason for hiding this comment

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

I appreciate these types of comments, thank you! 🎉

Copy link
Member

@gerardo-rodriguez gerardo-rodriguez left a comment

Choose a reason for hiding this comment

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

Code seems good to me! 👍

@calebeby calebeby merged commit e06e6bc into main Jun 30, 2021
@calebeby calebeby deleted the source-maps branch June 30, 2021 17:13
@github-actions github-actions bot mentioned this pull request Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants