__dirname and __filename refer to the compiled JavaScript file's location, rather than the original Earl Grey source. A pair of macros that expanded to the original source location would be useful.
Here's an example implementation:
inline-macro source-dirname(#void{}): `path.dirname(module.filename)`
inline-macro source-filename(#void{}): `module.filename`
__dirnameand__filenamerefer to the compiled JavaScript file's location, rather than the original Earl Grey source. A pair of macros that expanded to the original source location would be useful.Here's an example implementation: