25 lines
464 B
JavaScript
25 lines
464 B
JavaScript
|
import typescript from "rollup-plugin-typescript2";
|
||
|
import resolve from "@rollup/plugin-node-resolve";
|
||
|
import commonjs from "@rollup/plugin-commonjs";
|
||
|
|
||
|
|
||
|
export default {
|
||
|
input: "src/index.ts",
|
||
|
output: [
|
||
|
{
|
||
|
file: "dist/index.esm.js",
|
||
|
format: "es",
|
||
|
globals: {
|
||
|
react: 'React',
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
external: ['react'],
|
||
|
plugins: [
|
||
|
typescript({
|
||
|
useTsconfigDeclarationDir: true,
|
||
|
}),
|
||
|
resolve(),
|
||
|
commonjs(),
|
||
|
],
|
||
|
};
|