Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(module-tools): close declarationMap when bundle dts #4012

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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