fix(storage): use esm.sh bundled aws-sdk to prevent fs error

Switched the CDN provider for the AWS SDK (R2 client) to the bundled version from `esm.sh` (`?bundle`). This resolves a runtime error `[unenv] fs.readFile is not implemented yet!` which occurred because the previous build was attempting to import Node.js-specific credential providers that rely on the filesystem.

The bundled version from `esm.sh` correctly resolves the browser entry points and provides browser-compatible polyfills (or safe defaults) for dependencies, ensuring the SDK initializes correctly in the client environment.

This change updates the `AWS_SDK_SPECIFIER` constant in `js/storage/r2-s3.js`.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-14 16:11:20 +00:00
1 parent 4aa0021029
commit 857536c28f
1 file changed
+1 -1
+1 -1
View File
@@ -1,6 +1,6 @@
// js/storage/r2-s3.js
const AWS_SDK_SPECIFIER = "https://esm.sh/@aws-sdk/[email protected]";
const AWS_SDK_SPECIFIER = "https://esm.sh/@aws-sdk/[email protected]?bundle";
const disableNetworkImports = Boolean(
globalThis?.__BITVID_DISABLE_NETWORK_IMPORTS__