mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-22 21:51:25 +03:00
Add logging timing output.
This commit is contained in:
parent
d45a3aff71
commit
1b3c7b8ce8
@ -95,6 +95,7 @@ function lookupOrPerform(portsFile, mode, rawRequest, hasFsAccess, useCache) {
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
console.time(`fetch ${request.url}`);
|
||||
const response = await fetch(request.url, {
|
||||
method: request.method,
|
||||
body: request.body,
|
||||
@ -103,6 +104,8 @@ function lookupOrPerform(portsFile, mode, rawRequest, hasFsAccess, useCache) {
|
||||
...request.headers,
|
||||
},
|
||||
});
|
||||
|
||||
console.timeEnd(`fetch ${request.url}`);
|
||||
const expectString = request.headers["elm-pages-internal"];
|
||||
|
||||
if (response.ok || expectString === "ExpectResponse") {
|
||||
|
Loading…
Reference in New Issue
Block a user