| Crates.io | rolldown_plugin_wasm_fallback |
| lib.rs | rolldown_plugin_wasm_fallback |
| version | 0.1.0 |
| created_at | 2025-10-18 05:08:11.514402+00 |
| updated_at | 2025-10-18 05:08:11.514402+00 |
| description | Rolldown plugin for WebAssembly fallback handling |
| homepage | https://rolldown.rs/ |
| repository | https://github.com/rolldown/rolldown |
| max_upload_size | |
| id | 1888828 |
| size | 81,120 |
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.
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.
import { defineConfig } from 'rolldown';
import { wasmFallbackPlugin } from 'rolldown/experimental';
export default defineConfig({
input: {
entry: './main.ts',
},
plugins: [wasmFallbackPlugin()],
});