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

inline script should not add sourceURL #2694

Closed
kuitos opened this issue Sep 20, 2023 · 3 comments
Closed

inline script should not add sourceURL #2694

kuitos opened this issue Sep 20, 2023 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kuitos
Copy link
Member

kuitos commented Sep 20, 2023

image

@kuitos kuitos self-assigned this Sep 20, 2023
@kuitos kuitos added this to the 3.0 milestone Sep 20, 2023
@kuitos kuitos added the bug Something isn't working label Sep 20, 2023
@wanghangit
Copy link
Contributor

这里我有一个疑问,sourceMap应该加载的是map.js文件,而这里的实现逻辑拼接的是src或者baseURL,好像不能起到调试的作用。
这里的本意是想在with语句执行报错可以映射到加载的原文件中吗,如果是这样的话baseUrl换成entry是不是更合理些,而不是删掉

@kuitos
Copy link
Member Author

kuitos commented Dec 19, 2023

sourceURL 是为了报错时 Chrome source 能跳到正确的外链 js,不是用来做 sourcemap 的,内联的 script 则没有这个问题

@wanghangit
Copy link
Contributor

wanghangit commented Dec 19, 2023

sourceURL 是为了报错时 Chrome source 能跳到正确的外链 js,不是用来做 sourcemap 的,内联的 script 则没有这个问题

这里有一个疑问,添加sourceURL的动机是沙箱内执行用的createObjectURL是一个临时的地址。所有只有这个场景需要?

还有我看目前下测试用例比较少,我是在这个pr中增加上下游的测试用例,还是只测我这一个方法就好了
已提pr #2850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants