-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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(compiler): always use ng://
prefix for sourcemap urls
#15218
Conversation
function ngJitFolder() { | ||
return 'ng://'; | ||
export function sourceUrl(url: string) { | ||
const urlWithourOrigin = url.replace(/(\w+:\/\/[\w:]+)?(\/+)?/, ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add -
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
const urlWithourOrigin = url.replace(/(\w+:\/\/[\w:]+)?(\/+)?/, ''); | ||
// Note: We need 3 "/" so that ng shows up as a separate domain | ||
// in the chrome dev tools. | ||
return `ng:///${urlWithourOrigin}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the replace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Fixes: - In G3, filePaths don’t start with a `/` and therefore became relative. - Always using the `ng://` prefix groups angular resources in the same way for AOT and JIT.
Hello, I suppose it's due to the new prefix for sourcemap urls. |
@boulix3 Could you try the following local modification in your node_modules for angular, so that I know the fix would work (as I don't have the right setup locally to reproduce):
|
@boulix3 FYI, sorcery seems to be less graceful with non existing sources (see e.g. Rich-Harris/sorcery#142) |
See #15246 |
Thanks a lot for the fast reply! |
…15218) Fixes: - In G3, filePaths don’t start with a `/` and therefore became relative. - Always using the `ng://` prefix groups angular resources in the same way for AOT and JIT.
I just finished testing your fix, it works great (I used 4.0.0-rc5). |
@boulix3 nice, so I already made this change in Angular as well, will be part of the next rc. |
…15218) Fixes: - In G3, filePaths don’t start with a `/` and therefore became relative. - Always using the `ng://` prefix groups angular resources in the same way for AOT and JIT.
…15218) Fixes: - In G3, filePaths don’t start with a `/` and therefore became relative. - Always using the `ng://` prefix groups angular resources in the same way for AOT and JIT.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes:
/
and therefore became relative.ng://
prefix groups angular resources in the sameway for AOT and JIT.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here)
What is the new behavior?
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: