Skip to content

Commit aa86fcf

Browse files
committed
fix(rollup): copy index.d.ts
1 parent c301cb2 commit aa86fcf

File tree

4 files changed

+548
-16
lines changed

4 files changed

+548
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ build
4848
/index-*.js
4949
/glsl.js
5050
/index.js
51+
/index.d.ts

.rolluprc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const babel = require('rollup-plugin-babel');
22
const resolve = require('rollup-plugin-node-resolve');
33
const minify = require('rollup-plugin-babel-minify');
44
const commonjs = require('rollup-plugin-commonjs');
5+
const copy = require('rollup-plugin-copy');
56

67
module.exports = [
78
{
@@ -29,6 +30,14 @@ module.exports = [
2930
exclude: 'node_modules/**',
3031
presets: [['@babel/preset-env', { modules: false }]]
3132
}),
33+
copy({
34+
targets: [
35+
{
36+
src: "src/index.d.ts",
37+
dest: "./",
38+
}
39+
]
40+
})
3241
]
3342
}, ...[
3443
{
@@ -71,6 +80,6 @@ module.exports = [
7180
bannerNewLine: true
7281
})
7382
]
74-
}
83+
};
7584
})
7685
];

0 commit comments

Comments
 (0)