ffmpeg.wasm icon indicating copy to clipboard operation
ffmpeg.wasm copied to clipboard

util 12.2 UMD is treated accidentally as ESM

Open akirataguchi115 opened this issue 9 months ago • 1 comments

The following code produces the following error:

<!DOCTYPE html>
<html>

<body>
  <script src="ffmpeg.js"></script>
  <script src="ffmpeg-core.js"></script>
  <script src="utils.12.1.js"></script>
  <script src="utils.12.2.js"></script>
</body>

</html>

Uncaught ReferenceError: exports is not defined: [utils.12.2.js:1:728](file:///C:/Users/akira/src/test/utils.12.2.js)

I can only use UMD since my Firefox extension MV2 can only use that. 12.1 index.js seems to load fine but 12.2 doesn't. Is this because of #627 ?

akirataguchi115 avatar Mar 13 '25 16:03 akirataguchi115

[Error] ReferenceError: Can't find variable: exports
	(anonymous function) (index.js:1:736)
	(anonymous function) (index.js:1:2955)
	(anonymous function) (index.js:1:199)
	Global Code (index.js:1:202)

Also on my safari extension... https://github.com/ffmpegwasm/ffmpeg.wasm/issues/854 I think it's related with this issue

Skyline-23 avatar May 26 '25 08:05 Skyline-23