Open FranklinYu opened 5 years ago
In CommonJS we have __dirname. In ES modules we use import.meta.url instead, which is a file: URL. It would be great if serveFolder also works with file URL.
__dirname
import.meta.url
file:
serveFolder
The related source should be
https://github.com/GoogleChromeLabs/carlo/blob/2c76e87bf53dc596af7f716d156db299a634b5ea/lib/carlo.js#L159-L161
I can PR if that is preferred.
In CommonJS we have
__dirname
. In ES modules we useimport.meta.url
instead, which is afile:
URL. It would be great ifserveFolder
also works with file URL.The related source should be
https://github.com/GoogleChromeLabs/carlo/blob/2c76e87bf53dc596af7f716d156db299a634b5ea/lib/carlo.js#L159-L161
I can PR if that is preferred.