Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return
}
if (stats.hasErrors()) {
spinner.stopAndPersist({ text: 'Failed to compile.\n\n', symbol: logSymbols.error })
const messages = formatMessages(stats)
if (messages.errors.length) {
messages.errors.forEach(e => console.log(e))
}
return
}
const port = await choosePort(8888)
const json = stats.toJson()
analyzer.start(json, { port })
await fs.writeJSON(path.join(paths.appDist, 'stat.json'), json)
spinner.stopAndPersist({ text: 'Extract successfully.', symbol: logSymbols.success })
})
}
report(args) {
let stats = require(path.join(process.cwd(), args.file));
BundleAnalyzer(stats, {
port: args.port
})
}
}