mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-05 11:35:34 +08:00
8 lines
264 B
TypeScript
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;
|
|
}
|