Make it ESM only

This commit is contained in:
Fabian Stamm 2023-11-22 22:18:40 +01:00
parent 153aca0ccb
commit e0b51625d8
3 changed files with 12 additions and 24 deletions

View File

@ -1,14 +1,15 @@
{ {
"name": "@hibas123/logging", "name": "@hibas123/logging",
"version": "3.1.2", "version": "4.0.0",
"description": "", "description": "",
"main": "out/index.js", "type": "module",
"types": "out/index.d.ts", "main": "esm/index.js",
"types": "esm/index.d.ts",
"module": "esm/index.js", "module": "esm/index.js",
"scripts": { "scripts": {
"prepublishOnly": "npm run build", "prepublishOnly": "npm run build",
"build": "tsc && tsc -p tsconfig.esm.json", "build": "tsc",
"test": "tsc && node out/test.js", "test": "tsc && node esm/test.js",
"postpublish": "denreg publish", "postpublish": "denreg publish",
"bench": "tsc && node benchmark.js", "bench": "tsc && node benchmark.js",
"prof": "tsc && ndb --prof benchmark.js" "prof": "tsc && ndb --prof benchmark.js"
@ -21,7 +22,6 @@
"license": "MIT", "license": "MIT",
"files": [ "files": [
"src/", "src/",
"out/",
"esm/", "esm/",
"tsconfig.json", "tsconfig.json",
"readme.md" "readme.md"
@ -33,4 +33,4 @@
"ts-node": "^9.1.1", "ts-node": "^9.1.1",
"typescript": "^4.2.4" "typescript": "^4.2.4"
} }
} }

View File

@ -1,11 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"target": "ES2017",
"moduleResolution": "node",
"outDir": "esm"
},
"exclude": ["node_modules"],
"include": ["src"]
}

View File

@ -1,12 +1,11 @@
{ {
"compilerOptions": { "compilerOptions": {
"module": "commonjs", "module": "ESNext",
"target": "esnext", "target": "ESNext",
"moduleResolution": "node",
"outDir": "esm",
"noImplicitAny": false, "noImplicitAny": false,
"sourceMap": true, "sourceMap": true
"outDir": "out",
"declaration": true,
"typeRoots": ["node_modules/@types"]
}, },
"exclude": ["node_modules"], "exclude": ["node_modules"],
"include": ["src"] "include": ["src"]