You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/11/06 12:33:35 UTC

[GitHub] [cordova] raphinesse commented on issue #132: Cordova lazy loading support for angular 8.

raphinesse commented on issue #132: Cordova lazy loading support for angular 8.
URL: https://github.com/apache/cordova/issues/132#issuecomment-550289662
 
 
   > Is this actually resolved?
   &mdash; @juristr
   
   > Any ideas why this has been closed?
   &mdash; @tscislo
   
   The Android WebView used by Cordova loads files via `file://` URLs. However, [the MDN guide on modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#Other_differences_between_modules_and_standard_scripts) states that:
   > You need to pay attention to local testing — if you try to load the HTML file locally (i.e. with a `file://` URL), you'll run into CORS errors due to JavaScript module security requirements. You need to do your testing through a server.
   
   You can also go ahead and try to open the minimal reproduction that @jamcoupe posted (thanks, by the way) directly from the file system with Chrome. It will give a `net::ERR_FAILED` when trying to load the script with `type="module"`. Since the Android WebView is Chrome, there's little we can do about this issue.
   
   That means, that configuring your build to not use `type="module"` is the correct solution here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org