Skip to content

Update README.md #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 28, 2022
Merged

Update README.md #423

merged 2 commits into from
Sep 28, 2022

Conversation

braebo
Copy link

@braebo braebo commented Sep 23, 2022

Replace require with ESM import

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Replace `require` with ESM import
@braebo braebo mentioned this pull request Sep 23, 2022
@@ -69,8 +69,7 @@ Or, using a script tag in the browser (only works in some browsers, see list bel
ffmpeg.wasm provides simple to use APIs, to transcode a video you only need few lines of code:

```javascript
const fs = require('fs');
const { createFFmpeg, fetchFile } = require('@ffmpeg/ffmpeg');
import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still need to import fs here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - hopefully the named import I've added works for you

@jeromewu
Copy link
Collaborator

Thanks for the PR! Just one minor part to improve, thanks!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Import writeFile
@braebo
Copy link
Author

braebo commented Sep 23, 2022

Done! I've added import { writeFile } from 'fs/promises'

@jeromewu
Copy link
Collaborator

Thanks for the PR!

@jeromewu jeromewu merged commit 6d62e1a into ffmpegwasm:master Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants