mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 11:23:45 +02:00
Revert back to static import of fs, don't like to CJS bundles in package.json
This commit is contained in:
+2
-2
@@ -692,7 +692,7 @@ export class FilePathTarget extends Target {
|
||||
throw new TypeError('options must be an object.');
|
||||
}
|
||||
|
||||
if (!node.getFs) {
|
||||
if (!node.fs) {
|
||||
throw new Error(
|
||||
'FilePathTarget is only available in server-side environments (Node.js, Bun, Deno).',
|
||||
);
|
||||
@@ -703,7 +703,7 @@ export class FilePathTarget extends Target {
|
||||
// Let's back this target with a StreamTarget, makes the implementation very simple
|
||||
const writable = new WritableStream<StreamTargetChunk>({
|
||||
start: async () => {
|
||||
this._fileHandle = await (await node.getFs()).open(filePath, 'w');
|
||||
this._fileHandle = await node.fs.open(filePath, 'w');
|
||||
},
|
||||
write: async (chunk) => {
|
||||
assert(this._fileHandle);
|
||||
|
||||
Reference in New Issue
Block a user