Improving ESModule support

This commit is contained in:
Fabian Stamm 2020-08-26 11:54:51 +02:00
parent 5203871aa8
commit 6000e69dcd
3 changed files with 6 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
node_modules/ node_modules/
lib/ lib/
es/ esm/

View File

@ -1,10 +1,10 @@
{ {
"name": "@hibas123/utils", "name": "@hibas123/utils",
"version": "2.2.7", "version": "2.2.10",
"description": "Different Utilities, that are not worth own packages", "description": "Different Utilities, that are not worth own packages",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",
"module": "es/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 && tsc -p tsconfig.esm.json",
@ -22,6 +22,8 @@
"files": [ "files": [
"src/", "src/",
"lib/", "lib/",
"esm/",
"tsconfig.esm.json",
"tsconfig.json", "tsconfig.json",
"readme.md" "readme.md"
], ],

View File

@ -3,6 +3,6 @@
"compilerOptions": { "compilerOptions": {
"module": "ESNext", "module": "ESNext",
"moduleResolution": "classic", "moduleResolution": "classic",
"outDir": "es" "outDir": "esm"
} }
} }