diff --git a/.gitignore b/.gitignore index 295a9ce..3ea8b67 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,7 @@ /tmp /out-tsc /bundles -/esm5 -/esm2015 +/esm # dependencies /node_modules diff --git a/package.json b/package.json index 2aaa03b..2e0cfb9 100644 --- a/package.json +++ b/package.json @@ -8,20 +8,21 @@ "scripts": { "test": "jest --watch", "test:ci": "jest", - "prebuild": "rimraf {dist,esm5,esm2015}", + "prebuild": "rimraf {dist,esm}", "build": "run-p 'tsc:*'", "tsc:main": "tsc -p tsconfig.json --outDir dist", - "tsc:esm5": "tsc -p tsconfig.esm5.json --outDir esm5", - "tsc:esm2015": "tsc -p tsconfig.esm2015.json --outDir esm2015", + "tsc:esm2015": "tsc -p tsconfig.esm.json --outDir esm", "format": "prettier --write 'src/**/*.ts'", "format:check": "prettier --check 'src/**/*.ts'", "lint": "yarn lint:eslint && yarn format:check", "lint:eslint": "eslint 'src/**/*.ts'" }, "main": "dist/index.js", - "module": "esm5/index.js", - "es2015": "esm2015/index.js", - "typings": "dist/index.d.ts", + "exports": { + "import": "./dist/index.js", + "require": "./esm/index.js" + }, + "types": "dist/index.d.ts", "peerDependencies": { "rxjs": "^6.0.0 || ^7.0.0" }, diff --git a/tsconfig.esm5.json b/tsconfig.esm.json similarity index 80% rename from tsconfig.esm5.json rename to tsconfig.esm.json index 5863b07..587d143 100644 --- a/tsconfig.esm5.json +++ b/tsconfig.esm.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "target": "es5", "module": "es2015", } } diff --git a/tsconfig.esm2015.json b/tsconfig.esm2015.json deleted file mode 100644 index 765ae9a..0000000 --- a/tsconfig.esm2015.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "target": "es2015", - "module": "es2015", - } -} diff --git a/tsconfig.json b/tsconfig.json index 3796fbe..b3952f0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compileOnSave": false, "compilerOptions": { - "target": "es5", + "target": "es2015", "module": "commonjs", "sourceMap": true, "declaration": true,