Skip to content

I can't seem to use this package when bundling my code for AWS lambda. #40

Closed

Description

@ivands

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. 🤞

Activity

  1. matmen commented on Jul 28, 2024

    @matmen
    Collaborator

    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.

  2. added this to the v3 milestone on Oct 14, 2026
  3. self-assigned this
    on Oct 14, 2026
  4. matmen commented on Oct 14, 2026

    @matmen
    Collaborator

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions