Skip to content

Commit 2688667

Browse files
committed
1.2.0
1 parent c3fa22f commit 2688667

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "workerize-loader",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "Automatically move a module into a Web Worker (Webpack loader)",
55
"main": "dist/index.js",
66
"repository": "developit/workerize-loader",
@@ -35,8 +35,8 @@
3535
"devDependencies": {
3636
"eslint": "^6.8.0",
3737
"eslint-config-developit": "^1.1.1",
38-
"karmatic": "^1.3.1",
39-
"microbundle": "^0.12.0-next.8",
38+
"karmatic": "^1.4.0",
39+
"microbundle": "0.12.0-next.8",
4040
"webpack": "^4.39.2"
4141
},
4242
"dependencies": {

src/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,23 @@ loader.pitch = function(request) {
6363
if (this.target!=='webworker' && this.target!=='web') {
6464
(new NodeTargetPlugin()).apply(worker.compiler);
6565
}
66-
66+
6767
// webpack >= v4 supports webassembly
6868
let wasmPluginPath = null;
6969
try {
7070
wasmPluginPath = require.resolve(
71-
'webpack/lib/web/FetchCompileWasmTemplatePlugin'
71+
'webpack/lib/web/FetchCompileWasmTemplatePlugin'
7272
);
73-
} catch (_err) {
73+
}
74+
catch (_err) {
7475
// webpack <= v3, skipping
7576
}
7677

7778
if (wasmPluginPath) {
78-
// eslint-disable-next-line global-require, import/no-dynamic-require
79+
// eslint-disable-next-line global-require
7980
const FetchCompileWasmTemplatePlugin = require(wasmPluginPath);
8081
new FetchCompileWasmTemplatePlugin({
81-
mangleImports: this._compiler.options.optimization.mangleWasmImports,
82+
mangleImports: this._compiler.options.optimization.mangleWasmImports
8283
}).apply(worker.compiler);
8384
}
8485

0 commit comments

Comments
 (0)