async function getOutputFile(dir, file) {
	if (typeof file !== 'string') {
		// @ts-ignore
		file = (await readdir(join(dir, 'build'))).find(f => file.test(f));
	}
	return await readFile(join(dir, 'build', file), 'utf8');
}
Get build output file as utf-8 string
@param {string} dir
@param {RegExp | string} file
@returns {Promise<string>}