Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.nuxt.hook(nuxtHook, async () => {
const logger = consola.withScope('memwatch')
if (!env.tty) {
logger.info('No tty found, nuxt-memwatch will not run')
return
}
options = setOptions(this.options.memwatch || options)
if (options.autoHeapDiff && !this.options.dev) {
logger.warn(`Creating heapDiffs is very expensive, only enable this in production if you really have to`)
}
options.appName = 'nuxt-memwatch'
options.groupName = 'nuxt-memwatch'
options.gcAfterEvery = options.gcAfterEvery || 0
if (options.graph) {
let requestCounter = 0