mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-04 20:02:26 +00:00
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:
1 parent
4aa0021029
commit
857536c28f
1 file changed
+1
-1
+1
-1
@@ -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__
|
||||
|
||||
Reference in new issue
Block a user