From b434657bc70d1a5f82b70bcc985974503aa7a56b Mon Sep 17 00:00:00 2001 From: Justin Poehnelt Date: Mon, 22 Nov 2021 15:36:27 -0700 Subject: [PATCH] fix: broken declarations (#371) --- rollup.config.js | 13 ++++++++++--- tsconfig.json | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 8a8a25c..1b0887e 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -29,7 +29,8 @@ export default [ { input: "src/index.ts", plugins: [ - typescript(), + typescript({ tsconfig: "./tsconfig.json", declarationDir: "./" }), + commonjs(), babel(babelOptions), terser(terserOptions), @@ -53,7 +54,11 @@ export default [ }, { input: "src/index.ts", - plugins: [typescript(), commonjs()], + plugins: [ + typescript({ tsconfig: "./tsconfig.json", declarationDir: "./" }), + + commonjs(), + ], output: { file: "dist/index.dev.js", format: "iife", @@ -62,7 +67,9 @@ export default [ }, { input: "src/index.ts", - plugins: [typescript()], + plugins: [ + typescript({ tsconfig: "./tsconfig.json", declarationDir: "./" }), + ], output: { file: "dist/index.esm.js", format: "esm", diff --git a/tsconfig.json b/tsconfig.json index 2f0ac77..1aecdf4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,5 +11,6 @@ "moduleResolution": "node", "skipLibCheck": true }, - "include": ["src/**/*"] + "include": ["src/**/*"], + "exclude": ["node_modules", "./dist"] }