Skip to content

Commit

Permalink
fix(types): add mts types declaration file
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobLey committed Sep 7, 2023
1 parent ed5e44c commit 6881520
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
"exports": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
"types": {
"import": "./dist/index.d.mts",
"require": "./dist/index.d.ts"
}
},
"main": "./dist/index.cjs",
"unpkg": "./dist/index.umd.js",
Expand Down
8 changes: 8 additions & 0 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ const rollupOptions: readonly RollupOptions[] = [
},
plugins: [dts()],
},
{
input: 'build/dts/index.d.ts',
output: {
dir: outputDir,
entryFileNames: '[name].mts',
},
plugins: [dts()],
},
]

export default rollupOptions

0 comments on commit 6881520

Please sign in to comment.