diff --git a/rollup.config.js b/rollup.config.js index fd9dffb0..a8a67604 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -28,7 +28,8 @@ export default [ { input: "src/index.ts", plugins: [ - typescript(), + typescript({ tsconfig: "./tsconfig.json", declarationDir: "./" }), + commonjs(), babel(babelOptions), terser(terserOptions), @@ -48,7 +49,12 @@ export default [ }, { input: "src/index.ts", - plugins: [typescript(), commonjs(), babel(babelOptions)], + plugins: [ + typescript({ tsconfig: "./tsconfig.json", declarationDir: "./" }), + + commonjs(), + babel(babelOptions), + ], output: { file: "dist/index.dev.js", format: "iife", @@ -57,7 +63,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 2730c5ef..ceeaa2e7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,5 +9,5 @@ "lib": ["ESNext", "DOM"] }, "include": ["src/**/*"], - "exclude": ["**/*.test.ts", "node_modules"] + "exclude": ["**/*.test.ts", "node_modules", "./dist"] }