rollup-plugin-comlink icon indicating copy to clipboard operation
rollup-plugin-comlink copied to clipboard

Add: autowrap feature

Open eight04 opened this issue 4 years ago • 0 comments

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();

eight04 avatar Feb 15 '21 12:02 eight04