-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Migration steps:
-
tsconfig.json-
compilerOptions.moduleshould be set tonode12ornodenext(to enable top-levelasync/await)
-
-
package.json- All packages need to have
typeset tomodule - All packages should declare a correct
exportsproperty - All dependencies should be updated to their esm variants (with some caveats)
- All packages need to have
-
tsfiles- All relative imports should have file extensions (.js)
- all
requirestatements should be removed in favor ofimport()orrequireviacreateRequire
Reference documentation:
- https://2ality.com/2021/06/typescript-esm-nodejs.html
- https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#ecmascript-module-support-in-node-js
Reference issues: