diff --git a/packages/common/env/src/worker.ts b/packages/common/env/src/worker.ts index a5e401a4b..d0675462e 100644 --- a/packages/common/env/src/worker.ts +++ b/packages/common/env/src/worker.ts @@ -1,6 +1,7 @@ export function getWorkerUrl(name: string) { return ( - environment.publicPath + + // NOTE: worker can not use publicPath because it must obey the same-origin policy + (environment.subPath || '/') + 'js/' + `${name}-${BUILD_CONFIG.appVersion}.worker.js` );