Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
})
})
const storyConfig = sanityConfig.get('storybook')
if (storyConfig) {
const plugins = sanityConfig.get('plugins') || []
if (plugins.indexOf('@sanity/storybook') === -1) {
throw new Error(
'`@sanity/storybook` is missing from `plugins` array. '
+ 'Either add it as a dependency and plugin, or remove the '
+ '`storybook` section of your projects `sanity.json`.'
)
}
listeners.push(storyBook(storyConfig))
}
return reinitializePluginConfigs({rootDir: options.rootDir, output})
.then(listenPromise)
.catch(getGracefulDeathHandler(config))
}
}