{"size": 989, "ext": "js", "max_stars_repo_path": "rollup.config.js", "max_stars_repo_name": "anly2/sse-client", "max_stars_repo_stars_event_min_datetime": "2020-02-22T12:08:24.000Z", "max_stars_repo_stars_event_max_datetime": "2021-05-09T16:14:23.000Z", "max_issues_repo_path": "rollup.config.js", "max_issues_repo_name": "anly2/sse-client", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "rollup.config.js", "max_forks_repo_name": "anly2/sse-client", "max_forks_repo_forks_event_min_datetime": "2020-02-22T12:08:27.000Z", "max_forks_repo_forks_event_max_datetime": "2021-02-11T04:46:49.000Z"}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 4, "avg_line_length": 19.78, "max_line_length": 62, "alphanum_fraction": 0.5308392315}
import typescript from 'rollup-plugin-typescript';
import { terser } from 'rollup-plugin-terser';
import replace from 'rollup-plugin-replace';

const libName = 'sse-client';
const umdName = 'SSEClient';

export default [
  {
    input: 'src/index.ts',
    output: {
      file: `dist/${libName}.js`,
      format: 'umd',
      name: umdName,
      indent: false,
    },
    plugins: [
      typescript(),
      replace({
        'process.env.NODE_ENV': JSON.stringify('development'),
      }),
    ],
  },

  // Browser Production
  {
    input: 'src/index.ts',
    output: {
      file: `dist/${libName}.min.js`,
      format: 'umd',
      name: umdName,
      indent: false,
    },
    plugins: [
      typescript(),
      replace({
        'process.env.NODE_ENV': JSON.stringify('production'),
      }),
      terser({
        compress: {
          pure_getters: true,
          unsafe: true,
          unsafe_comps: true,
          warnings: false,
        },
      }),
    ],
  },
];
