cronvel / terminal-kit

Terminal utilities for node.js
MIT License
3.08k stars 198 forks source link

support ESM #200

Closed rudolfolah closed 1 year ago

rudolfolah commented 2 years ago

There's an article here on how to do this: https://electerious.medium.com/from-commonjs-to-es-modules-how-to-modernize-your-node-js-app-ad8cdd4fb662

The steps seem to be:

  1. "type": "module" to the package.json
  2. convert all imports and exports
  3. fix imports and exports

For the time being, the following snippet could be added to the README.md:

import terminalKitPackage from 'terminal-kit';
const { terminal } = terminalKitPackage;
hades3729 commented 1 year ago

Any news about this?

cronvel commented 1 year ago

... except that there are lazy require that cannot translate into ESM...