You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When use https://sfc.vuejs.org/ sometimes css is not in the output iframe page.
I trace the code and find when code use window.__css__,it is still nothing
this is a problem with es-module-shims witch causes normal script run as module script in twice.
here is a demo:
<html><head><metacharset="utf-8"><scriptasync="" src="https://unpkg.com/[email protected]/dist/es-module-shims.wasm.js"></script></head><body><script>asyncfunctionstart(){constscripts=[`console.log('script run!!!!!! but run twice')`]for(letscriptofscripts){constscriptNode=document.createElement('script')scriptNode.setAttribute('type','module')scriptNode.innerHTML=scriptdocument.head.appendChild(scriptNode)}}setTimeout(()=>start(),2000)</script><div>this is a test</div><divid="app"></div></body></html>
you will see two log with script run!!!!!! but run twice
Thus window.__css__ = 'xxxxxxxx' code was covered by window.__css__ = ''(run twice)
The text was updated successfully, but these errors were encountered:
When use https://sfc.vuejs.org/ sometimes css is not in the output iframe page.
I trace the code and find when code use
window.__css__
,it is still nothingthis is a problem with es-module-shims witch causes
normal script
run asmodule script
in twice.here is a demo:
you will see two log with
script run!!!!!! but run twice
Thus
window.__css__ = 'xxxxxxxx'
code was covered bywindow.__css__ = ''
(run twice)The text was updated successfully, but these errors were encountered: