Skip to content

markduan/rollup-plugin-reference-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-reference-module

Get module reference, a url to the find bundled module, so you can use it in iframe or worker.

Usage

import someModuleURL from 'REF:./path/to/someModule';

// use it in worker
const worker = new Worker(someModuleURL);

// inject is into iframe
const iframeDoc = document.getElementById('iframe').contentDocument;
const script = iframeDoc.createElement('script');
script.src = someModuleURL;
iframeDoc.body.append(script);

About

A rollup plugin to bundle module to a reference string

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published