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
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,13 @@ Bun 1.1.5 added a similar feature in [April 2024](https://bun.sh/blog/bun-v1.1.5
95
95
importhtmlfrom"./index.html" with { type: "text" };
96
96
```
97
97
98
+
Webpack has [asset modules](https://webpack.js.org/guides/asset-modules/) to inline a data URI via [url-loader](https://www.npmjs.com/package/url-loader) and now `asset/inline`.
Both are viable solutions. Uint8Array matches the [Response.bytes()](https://developer.mozilla.org/en-US/docs/Web/API/Response/bytes) method return type as well as [Deno's implementation](https://deno.com/blog/v2.4#importing-text-and-bytes). Uint8Array is also compatible with [Node.js Buffer](https://nodejs.org/api/buffer.html#buffer) which makes it widely compatible with existing JavaScript code.
0 commit comments