Skip to content

Commit

Permalink
fix(module-tools): close declarationMap when bundle dts (#4012)
Browse files Browse the repository at this point in the history
  • Loading branch information
10Derozan committed Jun 20, 2023
1 parent ae16058 commit 7073297
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/thirty-cooks-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/module-tools': patch
---

fix: close declarationMap when bundle dts
fix: 打包dts时关闭declarationMap
3 changes: 2 additions & 1 deletion packages/solutions/module-tools/src/builder/dts/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,15 @@ export const runRollup = async (
dtsPlugin({
respectExternal,
compilerOptions: {
declarationMap: false,
skipLibCheck: true,
// https://github.com/Swatinem/rollup-plugin-dts/issues/143,
// but it will cause error when bundle ts which import another ts file.
preserveSymlinks: false,
...options,
// https://github.com/Swatinem/rollup-plugin-dts/issues/127
composite: false,
// https://github.com/Swatinem/rollup-plugin-dts/issues/113
declarationMap: false,
// isAbsolute
baseUrl,
// Ensure ".d.ts" modules are generated
Expand Down

0 comments on commit 7073297

Please sign in to comment.