Open
Description
As more and more dependencies are updating to ESM, I've figured it's time to bite the bullet and make my project ESM-ready as well.
But adding "type": "module"
to my project's package.json leads to these two issues when running node build.js
:
-
import {build, cliopts} from "estrella"; ^^^^^ SyntaxError: Named export 'build' not found. The requested module 'estrella' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: import pkg from 'estrella'; const {build, cliopts} = pkg;
the proposed workaround works though.
-
TypeError: Cannot read properties of undefined (reading 'filename')
this is due to this code:Line 27 in e5b985b
process.mainModule
does not seem to exist in ESM.
Metadata
Metadata
Assignees
Labels
No labels