Skip to content

Commit

Permalink
fix: configure typescript to output commonjs modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mayudev committed Jun 23, 2023
1 parent 107f1f2 commit 03cdd6f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 27 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
"name": "revcord",
"version": "1.1.1",
"description": "A discord-revolt bridge",
"type": "module",
"scripts": {
"start": "node --experimental-specifier-resolution=node build/index.js",
"dev": "node --experimental-specifier-resolution=node --loader ts-node/esm index.ts",
"start": "node build/index.js",
"dev": "ts-node index.ts",
"build": "tsc",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down Expand Up @@ -34,4 +33,4 @@
"@types/node": "^20.3.1",
"ts-node": "^10.9.1"
}
}
}
38 changes: 15 additions & 23 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
{
"compilerOptions": {
"module": "es2015",
"baseUrl": "./",
"outDir": "build",
"target": "es6",
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"moduleResolution": "node",
"lib": [
"es2021"
],
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
},
"include": [
"index.ts",
"app/**/*.ts"
],
"exclude": [
"./webui"
]
}
"compilerOptions": {
"module": "commonjs",
"baseUrl": "./",
"outDir": "build",
"target": "es6",
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"moduleResolution": "node",
"lib": ["es2021"],
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
},
"include": ["index.ts", "app/**/*.ts"]
}

0 comments on commit 03cdd6f

Please sign in to comment.