Before, doing import fs from 'fs-extra' would indeed get you the fs module.
Now, fs is undefined (though import { nonDefaultExport } from 'example-package' still appears to work).
I don't know how exactly "default" imports work with .cjs, so I'm not sure what the specific issue is here.
To reproduce
See this reproduce repo I made for you
Details
Before, doing
import fs from 'fs-extra'
would indeed get you thefs
module. Now,fs
is undefined (thoughimport { nonDefaultExport } from 'example-package'
still appears to work).I don't know how exactly "default" imports work with
.cjs
, so I'm not sure what the specific issue is here.Workaround
Use
@swc-node/register@1.6.8