You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
I can't seem to use this package when bundling my code for AWS lambda. #40
Right now, I'm bundling my code to make it ready for AWS Lambda.
But because of how the WASM is loaded, the bundler can't know about the WASM files.
Would it be possible to import the WASM file with a regular import statement?
Example:
import{decode}from"file.wasm"
This would allow bundlers to recognize what is happening and include the wasm file in the bundle output.
Of course, node / deno will need native support for wasm imports. 🤞
The browser branch might work for you, though it uses fetch() calls to import the WASM instead of using a local binary. I'm not sure the npm version would work on AWS Lambda - even if bundled accordingly.
Fixed in 3.0.0: ImageScript no longer ships any WebAssembly or native binaries. Every codec is plain TypeScript, so there’s nothing to load, bundle or compile per platform, and it runs on Alpine/musl, in bundled serverless functions, Deno, Bun and browsers. npm install imagescript@3; see the changelog for breaking changes.
Activity
matmen commentedon Jul 28, 2024
The browser branch might work for you, though it uses fetch() calls to import the WASM instead of using a local binary. I'm not sure the npm version would work on AWS Lambda - even if bundled accordingly.
matmen commentedon Oct 14, 2026
Fixed in 3.0.0: ImageScript no longer ships any WebAssembly or native binaries. Every codec is plain TypeScript, so there’s nothing to load, bundle or compile per platform, and it runs on Alpine/musl, in bundled serverless functions, Deno, Bun and browsers. npm install imagescript@3; see the changelog for breaking changes.