const babel = require('@rollup/plugin-babel');
const ts = require('@rollup/plugin-typescript');
const commonjs = require('@rollup/plugin-commonjs');
const multiInput = require('rollup-plugin-multi-input').default;

module.exports = {
  input: ['../bcoe-v8-coverage/src/lib/*.ts'],
  output: {
    dir: '../bcoe-v8-coverage/dist/lib',
    format: 'cjs',
  },
  plugins: [
    multiInput(),
    babel({ babelHelpers: 'bundled' }),
    ts({
      //declaration: true,
      skipLibCheck: true,
      exclude:["node_modules","debian","test","gulpfile.ts"],
      allowSyntheticDefaultImports: true,
      // typescript 6 refuses the node10 resolution the plugin picks for a
      // CommonJS module; rollup wants ES modules anyway
      module: "esnext",
      moduleResolution: "bundler",
      types: ["node", "mocha"],
      //declarationDir:'../bcoe-v8-coverage/dist/lib',
      //dir:'../bcoe-v8-coverage/dist/lib',
    }),
    commonjs(),
  ]
};
