Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-web-worker-loader

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-web-worker-loader - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

package.json
{
"name": "rollup-plugin-web-worker-loader",
"version": "0.1.0",
"description": "Bundle",
"version": "0.1.1",
"description": "Rollup plugin to bundle web worker code to later be instantiated as a Worker",
"main": "src/index.js",

@@ -6,0 +6,0 @@ "repository": "https://github.com/darionco/rollup-plugin-web-worker-loader",

@@ -13,2 +13,3 @@ const path = require('path');

const idMap = new Map();
const exclude = new Map();
let projectOptions = null;

@@ -45,7 +46,7 @@

if (target && !idMap.has(importee)) {
idMap.set(importee, Object.assign({}, projectOptions, {
idMap.set(target, Object.assign({}, projectOptions, {
input: target,
}));
return importee;
return target;
}

@@ -57,4 +58,5 @@ }

load: id => new Promise((resolve, reject) => {
if (idMap.has(id)) {
if (idMap.has(id) && !exclude.has(id)) {
const inputOptions = idMap.get(id);
exclude.set(id, true);
rollup.rollup(inputOptions).then(bundle => {

@@ -70,2 +72,3 @@ bundle.generate({ format: 'es', name: id, sourcemap: true }).then( result => {

}
exclude.delete(id);
if (chunk !== null) {

@@ -72,0 +75,0 @@ let source = utils.extractSource(chunk.code, chunk.exports);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc