worker-plugin
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -20,3 +20,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var workerOptions = { | ||
filename: chunkFilename, | ||
filename: chunkFilename.replace(/\[(?:chunkhash|contenthash)(:\d+(?::\d+)?)?\]/g, '[hash$1]'), | ||
chunkFilename: chunkFilename, | ||
@@ -36,3 +36,6 @@ globalObject: 'self' | ||
}); | ||
workerCompiler.runAsChild(function (err, entries) { | ||
workerCompiler.runAsChild(function (err, entries, compilation) { | ||
if (!err && compilation.errors && compilation.errors.length) { | ||
err = compilation.errors[0]; | ||
} | ||
var entry = entries && entries[0] && entries[0].files[0]; | ||
@@ -39,0 +42,0 @@ if (!err && !entry) |
{ | ||
"name": "worker-plugin", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Webpack plugin to bundle Workers automagically.", | ||
@@ -5,0 +5,0 @@ "main": "dist/worker-plugin.js", |
@@ -36,3 +36,3 @@ <p align="center"> | ||
plugins: [ | ||
+ new WorkerPlugin() | ||
+ new WorkerPlugin() | ||
] | ||
@@ -39,0 +39,0 @@ <...> |
@@ -37,3 +37,3 @@ /** | ||
const workerOptions = { | ||
filename: chunkFilename, | ||
filename: chunkFilename.replace(/\[(?:chunkhash|contenthash)(:\d+(?::\d+)?)?\]/g, '[hash$1]'), | ||
chunkFilename, | ||
@@ -55,3 +55,6 @@ globalObject: 'self' | ||
workerCompiler.runAsChild((err, entries) => { | ||
workerCompiler.runAsChild((err, entries, compilation) => { | ||
if (!err && compilation.errors && compilation.errors.length) { | ||
err = compilation.errors[0]; | ||
} | ||
const entry = entries && entries[0] && entries[0].files[0]; | ||
@@ -58,0 +61,0 @@ if (!err && !entry) err = Error(`WorkerPlugin: no entry for ${request}`); |
Sorry, the diff of this file is not supported yet
35989
244