rollup-plugin-backdoor
v4.0.1-alpha.0
Published
Open backdoor to access instance via global vars.
Downloads
1
Readme
rollup-plugin-backdoor
Open backdoor to access instance via global vars.
CAUTION: Only for rollup in browser(main-thread)
$ npm install rollup-plugin-backdoor --save
# or
$ yarn add rollup-plugin-backdoor
Options
instances: {[name: string]: any}
Example
// runner code
import Foo from "backdoor:Foo";
new Foo();
// rollup.config.js
import { backdoor } from "rollup-plugin-backdoor";
export default {
plugins: [
backdoor({
instances: {
Foo: class Foo {}, // open in memory proxy
},
}),
// ..
],
};
LICENSE
MIT