@pirireis/webglobeplugins 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pirireis/webglobeplugins",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "main": "index.js",
5
5
  "author": "Toprak Nihat Deniz Ozturk",
6
6
  "license": "MIT",
@@ -18,9 +18,11 @@ function initWorkers() {
18
18
  addWorker();
19
19
  }
20
20
  function addWorker() {
21
- // IMPORTANT: use the TS entry so the bundler can build the worker module.
21
+ // IMPORTANT: keep this extensionless so it resolves to:
22
+ // - ./worker.ts in source builds (when .ts is resolvable)
23
+ // - ./worker.js in published output (tsc emits .js to dist)
22
24
  // @ts-ignore
23
- const worker = new Worker(new URL("./worker.ts", import.meta.url), { type: "module" });
25
+ const worker = new Worker(new URL("./worker", import.meta.url), { type: "module" });
24
26
  const wrapper = {
25
27
  worker,
26
28
  inProgress: false,
@@ -10,7 +10,7 @@ export class WorkerContact {
10
10
  this.onResult = onResult;
11
11
  // Initialize the Master Worker
12
12
  // @ts-ignore
13
- this._masterWorker = new Worker(new URL("./master-worker.ts", import.meta.url), { type: 'module' });
13
+ this._masterWorker = new Worker(new URL("./master-worker", import.meta.url), { type: 'module' });
14
14
  this._masterWorker.onmessage = (event) => {
15
15
  this.onResult(event.data);
16
16
  };