Closed trusktr closed 3 years ago
Solution is super simple. Replace:
if ( ! opts.title ) {
const dirpath = path.dirname(process.mainModule.filename);
const dirname = path.basename(dirpath);
this.title = dirname;
} else {
with
if ( ! opts.title ) {
const dirname = process.cwd();
this.title = dirname;
} else {
It's just a default window title, so the difference won't matter much.
Hello. Thank you for the contribution! I've merged the proposed changes, and will release the updated package soon
glfw-raub@4.5.1
When importing
glfw-raub
usingimport
in a Node ESM file, it has an error:This is because there is no
process.mainModule
in ESM mode.