Skip to content

Commit da9b990

Browse files
authored
fix: Keep JSDoc comments in dts files (#82)
Small tweak to build configs to preserve JSDoc comments.
1 parent 76de159 commit da9b990

File tree

5 files changed

+28
-0
lines changed

5 files changed

+28
-0
lines changed

.changeset/cool-sheep-care.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@codecov/bundler-plugin-core": patch
3+
"@codecov/webpack-plugin": patch
4+
"@codecov/rollup-plugin": patch
5+
"@codecov/vite-plugin": patch
6+
---
7+
8+
Preserve JSDoc comments during build process for the bundler plugins

packages/bundler-plugin-core/build.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ export default defineBuildConfig({
66
declaration: "compatible",
77
sourcemap: true,
88
rollup: {
9+
dts: {
10+
compilerOptions: {
11+
removeComments: false,
12+
},
13+
},
914
emitCJS: true,
1015
esbuild: {
1116
minify: true,

packages/rollup-plugin/build.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ export default defineBuildConfig({
77
sourcemap: true,
88
externals: ["rollup"],
99
rollup: {
10+
dts: {
11+
compilerOptions: {
12+
removeComments: false,
13+
},
14+
},
1015
emitCJS: true,
1116
esbuild: {
1217
minify: true,

packages/vite-plugin/build.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ export default defineBuildConfig({
77
sourcemap: true,
88
externals: ["vite"],
99
rollup: {
10+
dts: {
11+
compilerOptions: {
12+
removeComments: false,
13+
},
14+
},
1015
emitCJS: true,
1116
esbuild: {
1217
minify: true,

packages/webpack-plugin/build.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ export default defineBuildConfig({
66
declaration: "compatible",
77
sourcemap: true,
88
rollup: {
9+
dts: {
10+
compilerOptions: {
11+
removeComments: false,
12+
},
13+
},
914
emitCJS: true,
1015
esbuild: {
1116
minify: true,

0 commit comments

Comments
 (0)