-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
file://
URLs should be treated as absolute when populating sourcemap sources
#5793
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
Comments
could be easy as master...milahu:patch-2 |
Is it how preprocess is expected to work then?
Example: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Describe the bug
If you pass
filename
andoutputFilename
options tosvelte.compile
, thesources
property of the resulting sourcemap will contain a relative path fromoutputFilename
tofilename
(and likewise forcssOutputFilename
). This is the only thingoutputFilename
is used for.sources
is used inconsistently in the wild; it's often unclear whether it's supposed to be describing filepaths or URLs. We treat it as a an array of filepaths, but that sometimes yields unwanted results: FredKSchott/snowpack#1941 (reply in thread).In the case where
to
is absolute,relative(from, to) === to
should be true.file://
URLs are absolute, but we don't treat them as such.To Reproduce
Expected behavior
outputFilename
should be disregarded,sources
should equal[filename]
. Instead we get../../../file:///path/to/project/index.svelte
.Severity
Not critical — possible to workaround.
The text was updated successfully, but these errors were encountered: