text: import resolve from "@rollup/plugin-node-resolve";
  import typescript from "rollup-plugin-typescript2";
  import commonjs from "@rollup/plugin-commonjs";
  import { terser } from "rollup-plugin-terser";
  
  export default {
    input: "src/index.tsx",
    output: [
      {
        file: "dist/index.js",
        format: "cjs",
        sourcemap: true,
      },
      {
        file: "dist/index.min.js",
        format: "cjs",
        plugins: [terser()],
        sourcemap: true,
      },
      {
        file: "dist/index.esm.js",
        format: "esm",
        sourcemap: true,
      },
      {
        file: "dist/index.esm.min.js",
        format: "esm",
        plugins: [terser()],
        sourcemap: true,
      },
    ],
    plugins: [
      resolve(),
      commonjs(),
      typescript({ useTsconfigDeclarationDir: true }),
    ],
    external: ["react", "react-dom"],
  };
  