Skip to content

Commit

Permalink
fix!: esm typescript support
Browse files Browse the repository at this point in the history
  • Loading branch information
jollyjerr committed Oct 8, 2023
1 parent 816e76c commit e32ac47
Show file tree
Hide file tree
Showing 4 changed files with 372 additions and 7 deletions.
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@
"files": [
"dist"
],
"main": "./dist/react-autosave.umd.cjs",
"module": "./dist/react-autosave.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/react-autosave.js",
"require": "./dist/react-autosave.umd.cjs"
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/react-autosave.js"
}
}
},
"main": "./dist/react-autosave.js",
"module": "./dist/react-autosave.js",
"types": "./dist/index.d.ts",
"keywords": [
"react",
"autosave",
"form"
],
"scripts": {
"dev": "vite",
"build": "tsc --noEmit && vite build && tsc --emitDeclarationOnly",
"build": "tsc --noEmit && vite build",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"lint": "eslint src/**",
Expand Down Expand Up @@ -60,6 +62,7 @@
"react-dom": "^18.2.0",
"typescript": "^5.2.2",
"vite": "^4.4.11",
"vite-plugin-dts": "^3.6.0",
"vitest": "^0.34.6"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit e32ac47

Please sign in to comment.