Skip to content

wasm plugin shouldn’t use base64 unless a file is marked as sync #324

@surma

Description

@surma
  • Rollup Plugin Name: @rollup/plugin-wasm
  • Rollup Plugin Version: 3.0.0
  • Rollup Version: 2.0
  • Operating System (or Browser): Chrome on MacOS
  • Node Version: v12.8

How Do We Reproduce?

https://repl.it/@surma/SaneCarelessSphere

Expected Behavior

The .wasm file should be emitted as an asset and loaded using fetch() when the .wasm file is not marked as `sync.

Actual Behavior

The .wasm file is inlined using base64, causing unnecessary file bloat.

I am opening an issue first to see if y’all would accept an PR to change the behavior of this plugin. Either me or @RReverser would be happy to whip one up :D

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions