diff --git a/.npmignore b/.npmignore index 0c0d706c7735..86575668ef5e 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,5 @@ example/ .circleci/ -src/ test/ .babelrc .flowconfig diff --git a/rollup.config.js b/rollup.config.js index 68e25b6d5cb3..e180ee858bc5 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -31,6 +31,7 @@ export function getConfig({ typescript({ tsconfig, clean: true, + useTsconfigDeclarationDir: true }), ...plugins, ], diff --git a/tsconfig.json b/tsconfig.json index 6e88a311e928..4cf82366571e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,8 @@ "jsx": "react", "skipLibCheck": true, "declaration": true, + "declarationMap": true, + "declarationDir": "./dist", "noEmit": true, "allowSyntheticDefaultImports": true, "lib": ["dom", "dom.iterable", "esnext"],