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 just needed this to use the Fedify ActivityPub server framework on Workers. This one cannot be polyfilled as it’s a syntax feature, so I had to strip the import attributes with a post-install script.
Describe the solution
Workers can import JSON like this:
But you can't do that anywhere else.
This works in Chrome and node, etc:
But does not work in workers, you get:
It would be nice to have workers support "with type" so it can be used in various places without having to change it specifically for workers.
Spec: https://github.com/tc39/proposal-import-attributes
Supported almost everywhere: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#browser_compatibility
The text was updated successfully, but these errors were encountered: