import path from 'path';
import babel, {getBabelOutputPlugin} from '@rollup/plugin-babel';

function resolve(p) {
	return path.resolve(__dirname, p);
}

module.exports = {
	input: resolve(`index.js`),
	output: {
		file: resolve(`dist.js`),
		name: 'tailwindcss',
		format: 'esm'
	},
	plugins: [
		babel({babelHelpers: 'inline'}),
		getBabelOutputPlugin({
			presets: [
        [
					'@babel/preset-env',
					{
						targets: {
							chrome: 51
						}
					}
				]
      ],
      plugins: [
        [ 
          "@babel/plugin-transform-runtime", {
            "corejs": 3,
            "regenerator": false
          }
        ]
      ]
    })
	],
	external: ['match-all']
};
