Skip to content

Commit 2ae6186

Browse files
authored
fix: broken declarations (#459)
1 parent d8cd2ae commit 2ae6186

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

rollup.config.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export default [
3434
{
3535
input: "src/index.ts",
3636
plugins: [
37-
typescript(),
37+
typescript({ tsconfig: "./tsconfig.json" }),
38+
3839
nodeResolve(resolveOptions),
3940
commonjs(),
4041
babel(babelOptions),
@@ -50,7 +51,8 @@ export default [
5051
{
5152
input: "src/index.ts",
5253
plugins: [
53-
typescript(),
54+
typescript({ tsconfig: "./tsconfig.json", declarationDir: "./" }),
55+
5456
nodeResolve(resolveOptions),
5557
commonjs(),
5658
babel(babelOptions),
@@ -65,7 +67,8 @@ export default [
6567
{
6668
input: "src/index.ts",
6769
plugins: [
68-
typescript(),
70+
typescript({ tsconfig: "./tsconfig.json", declarationDir: "./" }),
71+
6972
nodeResolve(resolveOptions),
7073
commonjs(),
7174
babel(babelOptions),
@@ -78,7 +81,12 @@ export default [
7881
},
7982
{
8083
input: "src/index.ts",
81-
plugins: [typescript(), nodeResolve(resolveOptions), commonjs()],
84+
plugins: [
85+
typescript({ tsconfig: "./tsconfig.json", declarationDir: "./" }),
86+
87+
nodeResolve(resolveOptions),
88+
commonjs(),
89+
],
8290
output: {
8391
file: "dist/index.esm.js",
8492
format: "esm",

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
"target": "ES6",
1111
"moduleResolution": "node"
1212
},
13-
"include": ["src/**/*"]
13+
"include": ["src/**/*"],
14+
"exclude": ["node_modules", "./dist"]
1415
}

0 commit comments

Comments
 (0)