diff --git a/Makefile b/Makefile index 16b0b49..07c4761 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,16 @@ -dist/ffprobe-wasm.js: +dist/ffprobe-wasm.mjs: mkdir -p dist && \ emcc --bind \ -O3 \ -L/tmp/ffmpeg-build/lib \ -I/tmp/ffmpeg-build/include/ \ -s EXPORTED_RUNTIME_METHODS="[FS, cwrap, ccall, getValue, setValue, writeAsciiToMemory]" \ - -s INITIAL_MEMORY=268435456 \ + -s INITIAL_MEMORY=268435456 \ + -s EXPORT_ES6=1 \ + -s MODULARIZE=1 \ + -s EXPORT_NAME="loadFFprobe" \ -lavcodec -lavformat -lavfilter -lavdevice -lswresample -lswscale -lavutil -lm -lx264 \ -pthread \ -lworkerfs.js \ - -o dist/ffprobe-wasm.js \ + -o dist/ffprobe-wasm.mjs \ src/ffprobe-wasm-wrapper.cpp