We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f16182f commit d209914Copy full SHA for d209914
1 file changed
src/lib/lib.ts
@@ -141,9 +141,15 @@ globalThis.__worker_wrapper__ = async (
141
}
142
143
const wrapper = `(({${finalVars.join(",")}}) => ${fnStr})`;
144
- const finalWorkerCode = patchedCode +
+ let finalWorkerCode = patchedCode +
145
WORKER_BODY.replace("%FN%", wrapper);
146
147
+ const nocheckPrefix = "// @ts-nocheck: Auto-generated worker file\n";
148
+
149
+ if (!finalWorkerCode.startsWith(nocheckPrefix)) {
150
+ finalWorkerCode = nocheckPrefix + finalWorkerCode;
151
+ }
152
153
const hash = createHash("md5").update(signatureKey).digest("hex");
154
const workerDir = resolve(process.cwd(), ".workers");
155
0 commit comments