rolldown_plugin_wasm_fallback 0.1.0

Rolldown plugin for WebAssembly fallback handling
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 80.65 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.79 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 55s Average build duration of successful builds.
  • all releases: 1m 55s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • rolldown/rolldown
    13270 738 201
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Boshen

Maintenance Guide

A plugin for rolldown-vite that provides a fallback error message for .wasm files, ported from Vite's wasmPlugin.

This plugin is exclusive to rolldown-vite and is not recommended for external use.

📦 What it does

This plugin intercepts all imports ending in .wasm and throws an informative error.

Since native ESM integration for WebAssembly is not yet supported, this plugin reminds users to use community plugins or explicit suffixes such as ?init or ?url.

🚀 Debug Usage

import { defineConfig } from 'rolldown';
import { wasmFallbackPlugin } from 'rolldown/experimental';

export default defineConfig({
  input: {
    entry: './main.ts',
  },
  plugins: [wasmFallbackPlugin()],
});