UNPKG

react-analytics-tracker

Version:

react-analytics-tracker is a React component for tracking user interactions and events on your web application. This component captures click and view events, collects various data points, and reports them to a specified endpoint.

41 lines (40 loc) 987 B
import babel from "rollup-plugin-babel"; import resolve from "@rollup/plugin-node-resolve"; import external from "rollup-plugin-peer-deps-external"; import terser from "@rollup/plugin-terser"; import postcss from "rollup-plugin-postcss"; import typescript from "@rollup/plugin-typescript"; export default [ { input: "./src/index.ts", output: [ { file: "dist/index.js", format: "cjs", exports: "named", sourcemap: true, }, { file: "dist/index.es.js", format: "es", exports: "named", sourcemap: true, }, ], plugins: [ postcss({ plugins: [], minimize: true, }), babel({ exclude: "node_modules/**", presets: ["@babel/preset-react", "@babel/preset-typescript"], }), external(), resolve(), terser(), typescript(), ], external: ["react", "react-dom"], }, ];