Skip to content

Commit

Permalink
✨ Make package ESM only, resolve #61
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed Aug 13, 2023
1 parent ead3926 commit 2787ab1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
"local storage",
"store"
],
"module": "./es/index.js",
"jsnext:main": "./es/index.js",
"type": "module",
"main": "./index.js",
"exports": "./index.js",
"types": "./index.d.ts",
"sideEffects": false,
"scripts": {
"build": "tsc && tsc --project tsconfig.esm.json",
"build": "tsc",
"size": "yarn run build && size-limit",
"lint": "eslint --cache --format=pretty --ext=.ts ./",
"test": "yarn run build && yarn run lint && if [[ -z $CI ]]; then jest --coverage --coverageReporters=text; else jest --coverage; fi",
Expand All @@ -40,9 +42,7 @@
"index.js",
"index.d.ts",
"src/**/*.js",
"src/**/*.d.ts",
"es/**/*.js",
"es/**/*.d.ts"
"src/**/*.d.ts"
],
"peerDependencies": {
"react": ">=18",
Expand Down Expand Up @@ -79,13 +79,13 @@
"size-limit": [
{
"name": "import *",
"path": "es/index.js",
"path": "index.js",
"limit": "1.75 kB",
"gzip": false
},
{
"name": "import *",
"path": "es/index.js",
"path": "index.js",
"limit": "800 B"
}
]
Expand Down
7 changes: 0 additions & 7 deletions tsconfig.esm.json

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "ES6",
"module": "CommonJS",
"module": "ES2015",
"jsx": "react",
"esModuleInterop": true,
// From what I understand while reading the docs "classic" was introduced first and "classic" is by
Expand Down

0 comments on commit 2787ab1

Please sign in to comment.