-
-
Notifications
You must be signed in to change notification settings - Fork 84
Absolute URLs as sourceRoot not supported #186
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
Fixed #188, anyway we don't support fetching remote URLs, so now we just fix |
@alexander-akait thank you for the quick fix. It works for me. But is there any chance we get this fix in a |
I strongly recommend to update to |
I created a branch from the 3.0.1 tag and cherry-picked your changes, but I do not have the permissions to push that branch. Also you said to create a PR, but what would be the target of that PR? There is no release branch for the 3.x.x line, is there? And finally the link to the CLA in your CONTRIBUTING.md seems to be broken, I get an error when I open it. |
@rgischk Sorry for this, missed that branch doesn't exits, crated https://github.com/webpack-contrib/source-map-loader/tree/v3
Can you provide a place there is it? |
@alexander-akait the link is located in the "Contributor License Agreement" section and links to
Also I still don't have any permissions to push a branch, so I cannot create a pull request. |
@rgischk Just fork repo, when ccheckout on v3 branch, then create a branch based in v3, commit and put to own fork, when you can push it here |
@alexander-akait I managed to do it now. Sorry for the trouble and thank you for the quick responses. |
Addresses error with nth-check source-map parsing: webpack-contrib/source-map-loader#186
Addresses error with nth-check source-map parsing: webpack-contrib/source-map-loader#186
* chore: simplify dependencies * fix: update source-map-loader Addresses error with nth-check source-map parsing: webpack-contrib/source-map-loader#186 * chore: upgrade to PyPI version
* chore: simplify dependencies * fix: update source-map-loader Addresses error with nth-check source-map parsing: webpack-contrib/source-map-loader#186 * chore: upgrade to PyPI version
* chore: simplify dependencies * fix: update source-map-loader Addresses error with nth-check source-map parsing: webpack-contrib/source-map-loader#186 * chore: upgrade to PyPI version
Bug report
When using an absolute URL as the
sourceRoot
, an error is thrown. According to multiple sources I found online, e.g. the typescript documentation, thesourceRoot
field is allowed to be a path or an URL.Actual Behavior
Using a sourceRoot like
https://raw.githubusercontent.com/fb55/htmlparser2/4763205746cd80120b5d2b69041197a394d24ba9/src/
results in an error like this:As you can see, the absolute URL is threated as a relative path and joined with the context, resulting in an invalid URL/path.
Expected Behavior
The absolute URL in the sourceRoot should be combined with the "source" to result in the valid URL, and not prefixed with the context path:
https://raw.githubusercontent.com/fb55/htmlparser2/4763205746cd80120b5d2b69041197a394d24ba9/src/index.ts
How Do We Reproduce?
The problem can easily be reproduced by adding the package
[email protected]
to a newly created create-react-app project and importing the package in the code. When running the react-scriptsbuild
command, the multiple warnings as seen above will be printed to the console.An example source map for the
htmlparser2
package looks like this:These are the steps to reproduce the issue:
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: