-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module Types Extra #2006
Module Types Extra #2006
Conversation
784a109
to
4ce3e2b
Compare
I've updated this PR to also bring all the different module types into a dedicated module-types extra that is not included in |
b780c7d
to
13b1607
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I think it's a little weird that we support js fallback for wasm and html, but not for json or css. But I like that this is pulled out into an extra.
@@ -0,0 +1,92 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 I think that this is better as an extra than baked into s.js and script-load. And am also glad that the module-types extra is included by default into system.js
Thanks for the review, merging to prep for the composition PR, then hopefully we're getting there on v6.
We support the fallback of application/javascript for all the fetch types. |
Ah I see that now -- misread the code earlier. 👍 this looks good. |
This implements the fallback approach as discussed in #2005 (comment), while abstracting all module types into their own extra.
This replaces the Web Assembly feature with a single module types extra, removing
.json
support in thes.js
loader too so that it would need this extra for JSON support.This gets the
s.js
loader footprint back down to 1.5KiB.The hardest part was testing it, which required a custom server harness for the tests. Nice to have this finally though :)