admin管理员组文章数量:1200772
If I programmatically include a <script>
tag with a src
attribute pointing to a webpack entrypoint, the runtime executes it the first time it is attached to the DOM. However, if I then remove that script tag and re-insert a new one with the same src
, it does not run again (even if a cache-busting querystring is appended). Presumably this is due to webpack's runtime module caching, or something similar (but manually popping the webpackChunk array does not work: the chunk is re-added to the array without re-running the script). However, I need this script to re-run every time it is reinserted into the DOM. How can I achieve this?
本文标签: Rerun webpack entrypointStack Overflow
版权声明:本文标题:Re-run webpack entrypoint - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738621729a2103228.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论