Closed peterpeterparker closed 1 year ago
Hi,
I have trouble to using open in my Node esm library because it relies on __dirname.
open
__dirname
// Path to included `xdg-open`. const localXdgOpenPath = path.join(__dirname, 'xdg-open');
At runtime I get following issue:
ReferenceError: __dirname is not defined in ES module scope
Is there a way to polyfill it to support both cjs and esm?
Done: https://github.com/sindresorhus/open/releases/tag/v9.0.0
Awesome, works like a charm. Thanks!
Hi,
I have trouble to using
open
in my Node esm library because it relies on__dirname
.At runtime I get following issue:
Is there a way to polyfill it to support both cjs and esm?