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
I wanna know about what kind of thing i'm dealing with.
On a bonus point. i would like to be able to polyfill unsupported assertion types if possible.
for instance... safari don't support assert { type: 'css' } so i would like to fetch the content of the code. construct a own stylesheet and export that a normal script with a default export.
but currently i can't do that... instead the workaround i have to do is omit the hole {assert: {type: 'css'}}) thing and only look at the url pathname.
i can only imagine more and more types being supported like:
and more to come...
so there need to be a way to polyfill stuff even if they are not supported.
but to do that i need to know what kind of thing scripts are trying to import stuff as.
a file type assertion could be transformed like this:
when i import something from a script that has assertion type
aka:
then i want to know what i'm dealing with when i'm listening to fetch events...
only using
event.request.destination
is not enough...I wanna know about what kind of thing i'm dealing with.
On a bonus point. i would like to be able to polyfill unsupported assertion types if possible.
for instance... safari don't support
assert { type: 'css' }
so i would like to fetch the content of the code. construct a own stylesheet and export that a normal script with a default export.cuz right now it dose not support it...
if i could polyfill it with service worker then i could fetch the source and convert it with something like this:
but currently i can't do that... instead the workaround i have to do is omit the hole
{assert: {type: 'css'}})
thing and only look at the url pathname.i can only imagine more and more types being supported like:
and more to come...
so there need to be a way to polyfill stuff even if they are not supported.
but to do that i need to know what kind of thing scripts are trying to import stuff as.
a file type assertion could be transformed like this:
given a import statement with:
The text was updated successfully, but these errors were encountered: