Files
AFFiNE-Mirror/packages/common/env/src/worker.ts
T
2025-04-03 11:55:56 +00:00

8 lines
264 B
TypeScript

export function getWorkerUrl(name: string) {
if (BUILD_CONFIG.debug && !name.endsWith('.worker.js')) {
throw new Error(`worker should be named with '.worker.js', get ${name}`);
}
return environment.workerPath + name + '?v=' + BUILD_CONFIG.appVersion;
}