Skip to content

Option for loading Wasm different ways #59

@brendandahl

Description

@brendandahl

Describe the feature

Inlining wasm is not always ideal do to the size increase and it also doesn't work well with extremely large files. It would be nice to have an option that controls how the wasm file is loaded.

The option name could be wasmLoadMode or wasmImportMethod where the options are 'inline', 'source-phase', 'fetch', 'cloudflare', '...?'. This setting would probably deprecate the esmImport setting.

Alternatively, there could be a targetEnv option like the current @rollup/plugin-wasm.

Any thoughts on how this should be implemented?

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions