Closed sigmaSd closed 5 months ago
The counter point is maybe its the responsibility of the module author to not use invalid utf8 But node and bun accepts it
This is correct.
Let sourceText be the result of UTF-8 decoding bodyBytes.
https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-module-script
Process a queue with an instance of UTF-8’s decoder, ioQueue, output, and "replacement".
fixes https://github.com/denoland/deno/issues/23911
bun and node seems to work this way, since they don't error when importing clipper.js (but I haven't checked their code)