how are workers supposed to work when there's no require
how are workers supposed to work when there's no require
require statement, it uses the import statement
Is there a way in a cloudflare worker to not reintercept a call, so let's say we intercept test.com/123 and then actually want to navigate to test.com/123?
ctx.waitUntilrequireconst mymodule = require('mymodule') // Not This
import { mymodule } from 'mymodule'; // <<< Thisexport default {
fetch(req) {
const newReq = new Request(req);
newReq.headers.append('Test', '1234');
return fetch(newReq);
}
}