import * as fs from 'fs' import * as path from 'path' export function readIndexHtml(publicPath: string): Promise { return new Promise((resolve, reject) => { fs.readFile(path.join(publicPath, 'index.html'), 'utf8', (err, data) => { if (!err) { resolve(data) } else { reject(err) } }) }) }