Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function startServer(program: IProgram) {
const indexHTMLActivity = report.phantomActivity(`building index.html`, {})
indexHTMLActivity.start()
const directory = program.directory
const directoryPath = withBasePath(directory)
const workerPool = WorkerPool.create()
const createIndexHtml = async (activity: ActivityTracker) => {
try {
await buildHTML.buildPages({
program,
stage: `develop-html`,
pagePaths: [`/`],
workerPool,
activity,
})
} catch (err) {
if (err.name !== `WebpackError`) {
report.panic(err)