Skip to content

Commit

Permalink
Merge pull request #7 from koppa96/6-cjs-type-declarations-are-not-ex…
Browse files Browse the repository at this point in the history
…ported

Fix: type declarations are not exported
  • Loading branch information
koppa96 authored Mar 29, 2024
2 parents 97a0473 + 09c82e9 commit 52a0999
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
{
"name": "linq-functional",
"type": "module",
"version": "1.0.1",
"version": "1.0.2",
"description": "A functional adaptation of C#'s LINQ, for building type safe, declarative queries.",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
"import": {
"default": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"require": {
"default": "./dist/index.cjs",
"types": "./dist/index.d.cts"
}
}
},
"types": "./dist/index.d.ts",
Expand Down
14 changes: 10 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ export default [
input: 'src/index.ts',
external: id => /node_modules/.test(id),
plugins: [dts()],
output: {
file: 'dist/index.d.ts',
format: 'es',
},
output: [
{
file: 'dist/index.d.ts',
format: 'es',
},
{
file: 'dist/index.d.cts',
format: 'cjs',
},
],
},
]

0 comments on commit 52a0999

Please sign in to comment.