Build: Add Safari 10.1 nomodule fix
See original GitHub issueSafari 10.1 supports modules, but does not support the nomodule
attribute - it will load <script nomodule>
anyway.
Reference: Modern Script Loading
First, there’s the Safari Fix. Safari 10.1 supports JS Modules not the
nomodule
attribute on scripts, which causes it to execute both the modern and legacy code (yikes!).Thankfully, Sam found a way to use a non-standard
beforeload
event supported in Safari 10 & 11 to polyfillnomodule
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Safari 10.1 `nomodule` support - Discover gists · GitHub
The best solution is to use a script tag and then simply check for module support if module support exists add the module...
Read more >Safari 10 supports module, but not nomodule - Remy Sharp
Except, of course, Safari 10 doesn't support nomodule . News to me, TIL. So in this case the whole codebase gets run twice....
Read more >Native ECMAScript modules: nomodule attribute for the ...
To execute a script as a module when in the browser, we need to add the type="module" attribute to it. Browsers without ESM...
Read more >Modern Script Loading - JASON Format
First, there's the Safari Fix. Safari 10.1 supports JS Modules not the nomodule attribute on scripts, which causes it to execute both the ......
Read more >SPM in project pre Xcode 11 - 'No … | Apple Developer Forums
Add a Comment ... This project was fine compiling non-Debug builds in Xcode 10. ... I hope they fix it as this will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We don’t use
<script nomodule>
for loading the application though, only for a few polyfills. We use a check in javascript so it won’t load both versions of the application if I understand it correctly.I will do some tests to see how it’s working out right now on 10.1
Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Open Web Components!