-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
fix: handle null/empty sources in source maps #3074
Conversation
I think it may be better to filter sources first as you proposed as an alternative, the file path in |
Thanks for the PR @danielroe. I was thinking, do you believe it would be useful to log a warning in these cases? Since the original error helped you found an issue in nuxt source maps, that may have been harder to see if it fails silently. |
@patak-js Yes, the error message could be something like |
UPDATE: issue was produced by
@nuxtjs/composition-api
-plugin incorrectly producing a sourcemap. Will address in there but it might be worth still handling an emptysource
.Description
This PR updates the sourcemap support in vite to handle empty strings.
The issue I'm facing is the following error:
It is produced by attempting to read a directory path:
sourceRoot
+ an emptysourcePath
(=''
).Alternative solutions
We could just filter
sources
first for non-empty strings.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).