From d2116fd213f87f5a088f0315fd7bc0c784d9749c Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 30 Oct 2023 15:50:58 -0700 Subject: [PATCH] refactor: move worker to services Signed-off-by: Varun Patil --- src/components/frame/XImgCache.ts | 2 +- src/components/frame/XImgWorker.ts | 2 +- src/{ => services}/worker.ts | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/{ => services}/worker.ts (100%) diff --git a/src/components/frame/XImgCache.ts b/src/components/frame/XImgCache.ts index f036b06d..28ab824f 100644 --- a/src/components/frame/XImgCache.ts +++ b/src/components/frame/XImgCache.ts @@ -1,6 +1,6 @@ import { API } from '@services/API'; import { onDOMLoaded } from '@services/utils'; -import { workerImporter } from '../../worker'; +import { workerImporter } from '@services/worker'; import type * as w from './XImgWorker'; // Global web worker to fetch images diff --git a/src/components/frame/XImgWorker.ts b/src/components/frame/XImgWorker.ts index 6b5d3f33..163d9709 100644 --- a/src/components/frame/XImgWorker.ts +++ b/src/components/frame/XImgWorker.ts @@ -1,5 +1,5 @@ import { CacheExpiration } from 'workbox-expiration'; -import { workerExport } from '../../worker'; +import { workerExport } from '@services/worker'; declare var self: ServiceWorkerGlobalScope; diff --git a/src/worker.ts b/src/services/worker.ts similarity index 100% rename from src/worker.ts rename to src/services/worker.ts