Skip to content

Commit

Permalink
fix: typescript declarations missing from package
Browse files Browse the repository at this point in the history
  • Loading branch information
armand1m committed Jul 4, 2021
1 parent a483435 commit f8b07b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"main": "dist/index.js",
"module": "dist/index.es.js",
"typings": "dist/index.d.ts",
"typings": "dist/types/index.d.ts",
"jsnext:main": "dist/index.es.js",
"keywords": [
"react",
Expand Down
6 changes: 4 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ export default {
format: 'es',
exports: 'named',
sourcemap: true
}
},
],
plugins: [
external(),
url(),
resolve(),
typescript(),
typescript({
tsconfig: './tsconfig.json',
}),
commonjs()
]
}
8 changes: 5 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@
"sourceMap": true,
"resolveJsonModule": true,
"declaration": true,
"outDir": "build",
"module": "esnext",
"target": "es5",
"lib": ["es6", "dom", "es2016", "es2017"],
"lib": ["dom", "esnext"],
"allowJs": false,
"jsx": "react",
"moduleResolution": "node",
"suppressImplicitAnyIndexErrors": true,
"noUnusedParameters": true
"noUnusedParameters": true,
"rootDir": "./src",
"outDir": "build",
"declarationDir": "types"
},
"include": ["src"],
"exclude": ["node_modules", "build", "dist", "example", "rollup.config.js"]
Expand Down

0 comments on commit f8b07b3

Please sign in to comment.