i was experiencing a problem where the library was not working as expected to serve a file that was clearly present/being requested. i was able to fix the issue locally by modifying line 98 of /src/utils.ts:
and it began to work. however, i'm not sure this is really the best fix. the real problem, it seems to me, is that it is calling contentType on pathFile (the full absolute file path) rather than just the filename (index.js or whatever).
i was experiencing a problem where the library was not working as expected to serve a file that was clearly present/being requested. i was able to fix the issue locally by modifying line 98 of /src/utils.ts:
i changed it to:
and it began to work. however, i'm not sure this is really the best fix. the real problem, it seems to me, is that it is calling
contentType
onpathFile
(the full absolute file path) rather than just the filename (index.js
or whatever).