Skip to content

Commit

Permalink
fix: fix worker bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanenkoStud committed Dec 14, 2023
1 parent 71cd76a commit 2051d49
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/kite-chat/src/kite-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import {
KiteMsgDelete,
} from '@pragmasoft-ukraine/kite-chat-component';

import KiteWorkerURL from './kite-worker?url';
import KiteDedicatedWorker from './kite-worker?worker&inline';
import KiteSharedWorker from './kite-worker?sharedworker&inline';
import {assert} from './assert';
import {
KiteDB,
Expand Down Expand Up @@ -98,8 +99,8 @@ export class KiteChat {
const onWorkerMessageBound = this.onWorkerMessage.bind(this);

const kiteWorker = window.SharedWorker
? new SharedWorker(KiteWorkerURL, {type: 'module'})
: new Worker(KiteWorkerURL, {type: 'module'});
? new KiteSharedWorker()
: new KiteDedicatedWorker();

const endpoint = new URL(this.opts.endpoint);

Expand Down

0 comments on commit 2051d49

Please sign in to comment.