Skip to content

Commit fcdedc1

Browse files
authored
Ignore worker instantiations using absolute URLs (#7)
1 parent 119cd4e commit fcdedc1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ export default class WorkerPlugin {
4646
});
4747
return false;
4848
}
49+
if (/^(https?:)?\/\//i.test(dep.string)) {
50+
// Ignore absolute URL workers
51+
return false;
52+
}
4953

5054
const optsExpr = expr.arguments[1];
5155
let typeModuleExpr = Types.objectProperty(

0 commit comments

Comments
 (0)