ffmpegwasm / ffmpeg.wasm

FFmpeg for browser, powered by WebAssembly
https://ffmpegwasm.netlify.app
MIT License
13.47k stars 776 forks source link

how to use ffmpeg.wasm with webpack5 ? #671

Open jojowwbb opened 5 months ago

jojowwbb commented 5 months ago

the emssage:

Uncaught SyntaxError: Cannot use 'import.meta' outside a module (at 639c66ec-fbe5-4b92-a104-83e80b724a2e:3:27)

ronaldohoch commented 5 months ago

Hi, i think you have same error when we try to use it in Angular. For a while, i'm using this code provided by @LostBeard: https://github.com/ffmpegwasm/ffmpeg.wasm/issues/548#issuecomment-1707248897 (Check the whole issue to know what happens)

They have merged some code but it don't work properly yet. https://github.com/ffmpegwasm/ffmpeg.wasm/pull/562

superbartman commented 4 months ago

You can exclude /@ffmpeg\/ffmpeg/ in webpack config to resolve it.