You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-15Lines changed: 19 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
1
# ts2esm
2
2
3
-
Converts your TypeScript import & export declarations into ESM-compatible declarations. 🪄
3
+
You want to transform your project into an ECMAScript module (ESM)? Look no further! This tool (`ts2esm`) converts your TypeScript import and export declarations into ESM-compatible ones. 🪄
4
+
5
+
It also [works with JavaScript](https://github.com/bennycode/ts2esm/issues/20#issuecomment-1894702085) projects since TypeScript is a superset of JavaScript.
4
6
5
7
## Guide
6
8
7
-
Convert your CommonJS TypeScript project into an ECMAScript module with these simple steps:
9
+
Convert your CommonJS projects (TypeScript or JavaScript) into ECMAScript modules with these simple steps:
8
10
9
11
1. Add `"type": "module"` in your `package.json`
10
12
2. Set [module](https://www.typescriptlang.org/tsconfig#module) to `"nodenext"` in your `tsconfig.json`
@@ -22,32 +24,34 @@ Watch this 5-minute video and learn how to migrate from CommonJS to ESM:
22
24
23
25
## Examples
24
26
25
-
### Imports
27
+
Here you can see the transformations that `ts2esm` applies.
0 commit comments