You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Couldn't create a great repro in time but I have debugged the issue below and made a PR (to compensate lol)
Describe the bug
When the browser requests a static asset: eg. /fonts/cera/Cera Pro.otf, it goes to readAsset in Deno where this happens
function readAsset (id) {
// https://deno.com/deploy/docs/serve-static-assets
const path = '.' + new URL(`../public${id}`, 'file://').pathname;
return Deno.readFile(path);
}
This tries to read ./fonts/cera/Cera%20Pro.otf from the file system which ofcourse doesn't exist. We need to decodeURIComponent the pathname before using it to read the file.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Node: v18.15.0
Nitropack: 2.5.2
Reproduction
Couldn't create a great repro in time but I have debugged the issue below and made a PR (to compensate lol)
Describe the bug
When the browser requests a static asset: eg.
/fonts/cera/Cera Pro.otf
, it goes toreadAsset
in Deno where this happensThis tries to read
./fonts/cera/Cera%20Pro.otf
from the file system which ofcourse doesn't exist. We need to decodeURIComponent the pathname before using it to read the file.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: