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

fix: dynamic append js-module script error #18

Merged
merged 2 commits into from
Jul 28, 2022
Merged

fix: dynamic append js-module script error #18

merged 2 commits into from
Jul 28, 2022

Conversation

Molunerfinn
Copy link
Contributor

@Molunerfinn Molunerfinn commented Jul 28, 2022

如果子应用里通过类似如下的方式动态引入 type=module 的脚本,wujie目前是会报错的:

(function() {
          let script = document.createElement('script');
          script.type="module"
          script.crossorigin=""
          script.src = 'https:/xxx.com/xxx.js';
          document.getElementsByTagName('head')[0].appendChild(script);
})();

image

这个fix在处理动态引入的脚本的时候补充了 module 属性

@yiludege yiludege merged commit 1181351 into Tencent:master Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants