v1.1.0 - Configurable runtime initialization
Adds provideRiveRuntime() to control when the Rive WASM runtime initializes (eager by default, optional lazy mode). Changes are additive relative to v1.0.0 - no breaking changes.
What's new
| API | Role |
|---|---|
provideRiveRuntime({ wasmUrl }) |
Eager runtime initialization on app startup |
provideRiveRuntime({ wasmUrl, lazy: true }) |
Lazy runtime initialization on first real usage |
RiveRuntimeConfig |
Public config type export for runtime setup |
| Internal shared runtime initializer | Idempotent + deduplicated runtime readiness across component/service |
RiveCanvasComponent and RiveFileService now coordinate runtime readiness in a single flow, including concurrent first-use scenarios.
import { ApplicationConfig } from '@angular/core';
import { provideRiveRuntime } from '@grandgular/rive-angular';
export const appConfig: ApplicationConfig = {
providers: [
provideRiveRuntime({
wasmUrl: 'assets/rive/rive.v1.wasm',
lazy: true,
}),
],
};Migration note
If you previously used:
provideAppInitializer(() => RuntimeLoader.setWasmUrl('assets/rive/rive.v1.wasm'));You can now use:
provideRiveRuntime({ wasmUrl: 'assets/rive/rive.v1.wasm' });Details
See CHANGELOG.md and the library README.md.