wui 7 месяцев назад
Родитель
Сommit
41d9faafd2
2 измененных файлов с 5 добавлено и 2 удалено
  1. 1 0
      package.json
  2. 4 2
      tsconfig.json

+ 1 - 0
package.json

@@ -1,6 +1,7 @@
 {
 {
   "name": "robin-api",
   "name": "robin-api",
   "version": "1.0.0",
   "version": "1.0.0",
+  "type": "module",
   "main": "dist/app.js",
   "main": "dist/app.js",
   "license": "MIT",
   "license": "MIT",
   "scripts": {
   "scripts": {

+ 4 - 2
tsconfig.json

@@ -1,10 +1,12 @@
 {
 {
   "ts-node": {
   "ts-node": {
-    "files": true
+    "files": true,
+    "esm": true
   },
   },
   "compilerOptions": {
   "compilerOptions": {
     "target": "ES2020",
     "target": "ES2020",
-    "module": "commonjs",
+    "module": "ESNext",
+    "moduleResolution": "node",
     "lib": ["ES2020"],
     "lib": ["ES2020"],
     "strict": true,
     "strict": true,
     "strictPropertyInitialization": false,
     "strictPropertyInitialization": false,