rollup-plugin-web-worker-loader
Advanced tools
Comparing version 1.4.0 to 1.4.1
{ | ||
"name": "rollup-plugin-web-worker-loader", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Rollup plugin to handle Web Workers", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -81,3 +81,9 @@ const fs = require('fs'); | ||
state.exclude.delete(target); | ||
bundle.generate({format: 'iife', name: 'worker_code', sourcemap: true}).then(result => { | ||
const bundleOptions = { | ||
format: 'iife', | ||
name: 'worker_code', | ||
sourcemap: true, | ||
inlineDynamicImports: true, | ||
}; | ||
bundle.generate(bundleOptions).then(result => { | ||
resolve(handleBundleGenerated(state, config, addWatchFile, id, workerID, result)); | ||
@@ -84,0 +90,0 @@ }).catch(reject); |
@@ -18,3 +18,3 @@ const path = require('path'); | ||
for (let i = 0; i < map.sources.length; ++i) { | ||
const full = findFullPath(map.sources[i], map.sourcesContent[i].length, chunk.modules); | ||
const full = map.sourcesContent[i] && findFullPath(map.sources[i], map.sourcesContent[i].length, chunk.modules); | ||
if (full) { | ||
@@ -21,0 +21,0 @@ const relative = path.relative(basePath, full); |
47107
527