Skip to content

Commit

Permalink
build: enable declarationMap
Browse files Browse the repository at this point in the history
Note: If it is not set both tsconfig's `declarationDir` and rollup.config's `useTsconfigDeclarationDir`,
distribution d.ts.map is incorrect
related issue: ezolenko/rollup-plugin-typescript2#204
  • Loading branch information
sisisin committed Mar 20, 2020
1 parent 0ae164f commit 9d9208e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
example/
.circleci/
src/
test/
.babelrc
.flowconfig
Expand Down
1 change: 1 addition & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function getConfig({
typescript({
tsconfig,
clean: true,
useTsconfigDeclarationDir: true
}),
...plugins,
],
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"jsx": "react",
"skipLibCheck": true,
"declaration": true,
"declarationMap": true,
"declarationDir": "./dist",
"noEmit": true,
"allowSyntheticDefaultImports": true,
"lib": ["dom", "dom.iterable", "esnext"],
Expand Down

0 comments on commit 9d9208e

Please sign in to comment.