import buble from 'rollup-plugin-buble'
import uglify from 'rollup-plugin-uglify'
import banner from './rollup.conf.banner'

export default {
	banner,
	input: 'src/index.js',
	plugins: [
		buble(),
		uglify({
			output: {
				comments (node, comment) {
					const { value: text, type } = comment
					if ('comment2' === type) {
						return /@license/.test(text)
					}
				},
			},
		}),
	],
	output: {
		file: 'dist/rematrix.min.js',
		format: 'iife',
		name: 'Rematrix',
	},
}

import buble from 'rollup-plugin-buble'
import uglify from 'rollup-plugin-uglify'
import banner from './rollup.conf.banner'

export default {
	banner,
	input: 'src/index.js',
	plugins: [
		buble(),
		uglify({
			// output: {
			// 	comments (node, comment) {
			// 		if (comment.type === 'comment2') {
			// 			return /@license/.test(comment.value)
			// 		}
			// 	},
			// },
		}),
	],
	output: {
		file: 'dist/rematrix.min.js',
		format: 'iife',
		name: 'Rematrix',
	},
}

remove license comment from minified dist