text: import { babel } from '@rollup/plugin-babel';
  import eslint from '@rollup/plugin-eslint';
  import multi from 'rollup-plugin-multi-input';
  import replace from '@rollup/plugin-replace';
  import pkg from './package.json';
  
  
  const globals = {
    react: 'React',
    imask: 'IMask',
    'prop-types': 'PropTypes',
  };
  
  export default [
    {
      input: 'src/index.js',
      external: Object.keys(globals),
      output: {
        name: 'ReactIMask',
        file: pkg.main,
        globals,
        format: 'umd',
        sourcemap: true,
      },
      plugins: [
        eslint({configFile: '../../.eslintrc'}),
        babel({
          rootMode: 'upward',
        }),
      ],
    },
    {
      input: ['src/**/*.js'],
      output: {
        format: 'esm',
        dir: 'esm',
      },
      plugins: [
        replace({
          "from 'imask'": "from 'imask/esm/imask'",
          "import 'imask'": "import 'imask/esm'",
          delimiters: ['', ''],
        }),
        multi(),
        babel({
          rootMode: 'upward',
        }),
      ]
    }
  ]
  