Replies: 2 comments 3 replies
-
hm.. does not sounds right.. maybe you mean that you always need credentials? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Why does that break it? Why does it need credentials to load a static file correctly? But after all this sounds like a bug in Android WebView, since the spec says same origin module scripts should send credentials by default... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have encountered a bug in angular when running inside an Android WebView.
After investigating I found out the scripts with type="module" do not send credentials by default, even for the same origin. This naturally breaks the angular application since the scripts fail to load.
There is a build option that forces adding the crossOrigin for the initial scripts, however, this doesn't work for lazy loaded scripts.
The answer I got from the Angular team is that it cannot be done because it is a webpack mechanism. Following is the final answer, followed by a link to the issue.
Angular Team Answer:
This is not actionable from our end as that is how Webpack handles crossOrigin.
webpack/lib/runtime/LoadScriptRuntimeModule.js
Lines 89 to 96 in c181294
Issue:
angular/angular-cli#22942 (comment)
Does anyone know how this can be achieved ?
For WebView to work a crossOrigin must be added for type="module" scripts, even inside the same origin.
Right now I manually edit the runtime.js file after creation to remove the same origin check.
Beta Was this translation helpful? Give feedback.
All reactions