Gathering detailed insights and metrics for rollup-plugin-worker-factory
Gathering detailed insights and metrics for rollup-plugin-worker-factory
Gathering detailed insights and metrics for rollup-plugin-worker-factory
Gathering detailed insights and metrics for rollup-plugin-worker-factory
npm install rollup-plugin-worker-factory
Typescript
Module System
Node Version
NPM Version
69.4
Supply Chain
95.7
Quality
75.9
Maintenance
100
Vulnerability
99.6
License
JavaScript (100%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
34,209
Last Day
30
Last Week
131
Last Month
500
Last Year
13,678
2 Stars
27 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Nov 24, 2021
Minified
Minified + Gzipped
Latest Version
0.5.7
Package Id
rollup-plugin-worker-factory@0.5.7
Unpacked Size
27.23 kB
Size
7.49 kB
File Count
10
NPM Version
6.14.12
Node Version
14.16.1
Cumulative downloads
Total Downloads
Last Day
-26.8%
30
Compared to previous day
Last Week
-1.5%
131
Compared to previous week
Last Month
14.4%
500
Compared to previous month
Last Year
5.4%
13,678
Compared to previous year
1
3
1npm i -D rollup-plugin-worker-factory
--experimental-workers
include rollup-plugin-worker-factory in your rollup plugins array for a build:
1const worker = require('rollup-plugin-worker-factory'); 2 3... 4plugins: [ 5 worker() 6] 7...
When you want to include a worker in your code prefix the file with worker!
:
1import SomeWorker from "worker!./src/some-worker.js";
Your worker should run without exporting any code and use the global self
variable to interact with the worker API. worker_threads.parentPort
for node has been slightly modified so that their API more closely matches web workers in the browser and will also be available on the global self
.
1const someDependency = require('../some-dep'); 2const whoKnows = require('who-knows'); 3 4self.addEventListener('message', function(e) { 5 const foo = someDependency(e); 6 7 self.postMessage(whoKnows(foo)); 8});
on
to addEventListener
on worker objectsoff
to removeEventListener
on worker objectspostMessage
so that the message sent is included as a value for a data
key on an object as this is how the browser works with postMessage.addEventListener
to on
on worker objectsremoveEventListener
to on
on worker objectsobjURL
propertyAn array of rollup plugins to bundle the web workers with, you will probably want:
Default: 'universal'
The type of factory to build, can be 'node', 'mock', 'browser', or 'universal'.
browser will only work in the browser
node will only work in node
mock will work everywhere but runs on the same thread
universal will work on the browser or node depending on available apis
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/27 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
25 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-03-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More