A Rollup plugin that enables top-level await (TLA) support for IIFE and UMD output formats, which Rollup does not natively support. Version 0.0.2 adds TypeScript declarations and supports Node.js >=14.18. It works by transforming the output to use a dynamic import or wrapper to handle TLA. Differentiators: lightweight, no additional runtime dependencies, and specifically targets IIFE/UMD where Rollup's own TLA handling is absent.
npm install rollup-plugin-tlaVerified import paths — ran on the pinned version, not inferred.
Shows how to add top-level await support for IIFE output format using rollup-plugin-tla.
Ensure output format is 'iife' or 'umd'.
Test the bundle thoroughly with your specific plugin chain.
Consider alternative approaches or test with Rollup v3+.
Change import { tla } from 'rollup-plugin-tla' to import tla from 'rollup-plugin-tla'.Use import instead of require.
Set output.format to 'iife' or 'umd'.
No dependency data recorded yet.