Skip to content

Commit

Permalink
Correctly reference bundled declarations file
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Jun 12, 2024
1 parent 7a4c334 commit 44e18da
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ export default inputPaths.map((inputPath) => {
targets: [
{
src: `src/${inputFilenameWithoutExtension}.d.ts`,
dest: "dist/umd",
rename: `${inputFilenameWithoutExtension}.min.d.ts`,
},
{
src: `src/${inputFilenameWithoutExtension}.d.ts`,
dest: "dist/esm",
dest: ["dist/umd", "dist/esm"],
rename: `${inputFilenameWithoutExtension}.min.d.ts`,
transform: (contents) => {
// Since the main declaration file is getting renamed too, we must
// update the references to it from the plugin declaration files
return String(contents).replace(
/jcanvas\.d\.ts/g,
"jcanvas.min.d.ts"
);
},
},
],
}),
Expand Down

0 comments on commit 44e18da

Please sign in to comment.