rollup-plugin-comlink
rollup-plugin-comlink copied to clipboard
Add: autowrap feature
Fixes #1.
This PR adds new option autoWrap: Array<RegExp>. If a module e.g. worker.js matches the regex, other modules depending on it will be converted from
import {foo} from "./worker.js";`
await foo();
to
import __comlink_import1 from "comlink:./worker.js"
await __comlink_import1.foo();