Currently, delet3 uses the CommonJS (CJS) module system, recognisable through the use of require() and module.exports, exports.constName = someConst, etc. The more modern approach is to use ES modules (ESM), which can be recognised through the use of the import and export keywords.
This PR updates all CJS module imports/exports with the ESM syntax, and makes adjustments where appropriate, as there are functional differences between CJS and ESM.
To support directory imports using ESM, the --experimental-specifier-resolution=node flag must now be included when starting delet3.
Currently, delet3 uses the CommonJS (CJS) module system, recognisable through the use of
require()
andmodule.exports
,exports.constName = someConst
, etc. The more modern approach is to use ES modules (ESM), which can be recognised through the use of theimport
andexport
keywords.This PR updates all CJS module imports/exports with the ESM syntax, and makes adjustments where appropriate, as there are functional differences between CJS and ESM.
To support directory imports using ESM, the
--experimental-specifier-resolution=node
flag must now be included when starting delet3.