Skip to content

Commit

Permalink
feat(library): ship library with types
Browse files Browse the repository at this point in the history
  • Loading branch information
rhahao committed Apr 27, 2024
1 parent 506f851 commit 9b05b9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
17 changes: 2 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
],
"main": "./dist/react-sw-helper.umd.js",
"module": "./dist/react-sw-helper.es.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/react-sw-helper.es.js",
Expand All @@ -44,7 +45,7 @@
},
"scripts": {
"dev": "vite",
"build": "vite build"
"build": "vite build && tsc"
},
"browserslist": {
"production": [
Expand All @@ -58,20 +59,6 @@
"last 1 safari version"
]
},
"eslintConfig": {
"env": {
"browser": true,
"node": true,
"es2020": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"sourceType": "module"
}
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/exec": "^6.0.3",
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"esModuleInterop": true,
"strict": true,
"skipLibCheck": true,
"target": "ESNext"
"target": "ESNext",
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "./dist"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
Expand Down

0 comments on commit 9b05b9c

Please sign in to comment.