Closed rudolfolah closed 1 year 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:
"type": "module"
package.json
For the time being, the following snippet could be added to the README.md:
import terminalKitPackage from 'terminal-kit'; const { terminal } = terminalKitPackage;
Any news about this?
... except that there are lazy require that cannot translate into ESM...
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:
"type": "module"
to thepackage.json
For the time being, the following snippet could be added to the README.md: