@parcel/workers 2.0.0-nightly.1285 → 2.0.0-nightly.1289
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/WorkerFarm.js +4 -0
- package/package.json +7 -7
- package/src/WorkerFarm.js +4 -0
package/lib/WorkerFarm.js
CHANGED
@@ -200,6 +200,10 @@ class WorkerFarm extends _events().default {
|
|
200
200
|
}
|
201
201
|
|
202
202
|
createHandle(method, useMainThread = false) {
|
203
|
+
if (!this.options.useLocalWorker) {
|
204
|
+
useMainThread = false;
|
205
|
+
}
|
206
|
+
|
203
207
|
return async (...args) => {
|
204
208
|
// Child process workers are slow to start (~600ms).
|
205
209
|
// While we're waiting, just run on the main thread.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parcel/workers",
|
3
|
-
"version": "2.0.0-nightly.
|
3
|
+
"version": "2.0.0-nightly.1289+99f466357",
|
4
4
|
"description": "Blazing fast, zero configuration web application bundler",
|
5
5
|
"license": "MIT",
|
6
6
|
"publishConfig": {
|
@@ -21,20 +21,20 @@
|
|
21
21
|
"node": ">= 12.0.0"
|
22
22
|
},
|
23
23
|
"dependencies": {
|
24
|
-
"@parcel/diagnostic": "2.0.0-nightly.
|
25
|
-
"@parcel/logger": "2.0.0-nightly.
|
26
|
-
"@parcel/types": "2.0.0-nightly.
|
27
|
-
"@parcel/utils": "2.0.0-nightly.
|
24
|
+
"@parcel/diagnostic": "2.0.0-nightly.1289+99f466357",
|
25
|
+
"@parcel/logger": "2.0.0-nightly.1289+99f466357",
|
26
|
+
"@parcel/types": "2.0.0-nightly.1289+99f466357",
|
27
|
+
"@parcel/utils": "2.0.0-nightly.1289+99f466357",
|
28
28
|
"chrome-trace-event": "^1.0.2",
|
29
29
|
"nullthrows": "^1.1.1"
|
30
30
|
},
|
31
31
|
"peerDependencies": {
|
32
|
-
"@parcel/core": "2.0.0-nightly.
|
32
|
+
"@parcel/core": "2.0.0-nightly.1287+99f466357"
|
33
33
|
},
|
34
34
|
"browser": {
|
35
35
|
"./src/cpuCount.js": false,
|
36
36
|
"./src/process/ProcessWorker.js": false,
|
37
37
|
"./src/threads/ThreadsWorker.js": false
|
38
38
|
},
|
39
|
-
"gitHead": "
|
39
|
+
"gitHead": "99f46635710785eb1e79e4f3c6bfe8c7b2062993"
|
40
40
|
}
|
package/src/WorkerFarm.js
CHANGED
@@ -192,6 +192,10 @@ export default class WorkerFarm extends EventEmitter {
|
|
192
192
|
}
|
193
193
|
|
194
194
|
createHandle(method: string, useMainThread: boolean = false): HandleFunction {
|
195
|
+
if (!this.options.useLocalWorker) {
|
196
|
+
useMainThread = false;
|
197
|
+
}
|
198
|
+
|
195
199
|
return async (...args) => {
|
196
200
|
// Child process workers are slow to start (~600ms).
|
197
201
|
// While we're waiting, just run on the main thread.
|